From cd147d7861f6f90d7f6256843957a251b2199053 Mon Sep 17 00:00:00 2001
From: akwizgran <akwizgran@users.sourceforge.net>
Date: Tue, 19 Nov 2013 23:13:54 +0000
Subject: [PATCH] Pass the group's salt through to the DB when subscribing.

---
 .../net/sf/briar/android/groups/ConfigureGroupActivity.java   | 4 +++-
 .../src/net/sf/briar/android/groups/ManageGroupsActivity.java | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/briar-android/src/net/sf/briar/android/groups/ConfigureGroupActivity.java b/briar-android/src/net/sf/briar/android/groups/ConfigureGroupActivity.java
index 61798d475d..60aa3ac6c3 100644
--- a/briar-android/src/net/sf/briar/android/groups/ConfigureGroupActivity.java
+++ b/briar-android/src/net/sf/briar/android/groups/ConfigureGroupActivity.java
@@ -76,7 +76,9 @@ SelectContactsDialog.Listener {
 		String name = i.getStringExtra("net.sf.briar.GROUP_NAME");
 		if(name == null) throw new IllegalStateException();
 		setTitle(name);
-		group = new Group(id, name, null);
+		b = i.getByteArrayExtra("net.sf.briar.GROUP_SALT");
+		if(b == null) throw new IllegalStateException();
+		group = new Group(id, name, b);
 		subscribed = i.getBooleanExtra("net.sf.briar.SUBSCRIBED", false);
 		boolean all = i.getBooleanExtra("net.sf.briar.VISIBLE_TO_ALL", false);
 
diff --git a/briar-android/src/net/sf/briar/android/groups/ManageGroupsActivity.java b/briar-android/src/net/sf/briar/android/groups/ManageGroupsActivity.java
index d597be21b1..9bf1e43d8b 100644
--- a/briar-android/src/net/sf/briar/android/groups/ManageGroupsActivity.java
+++ b/briar-android/src/net/sf/briar/android/groups/ManageGroupsActivity.java
@@ -135,6 +135,7 @@ implements DatabaseListener, OnItemClickListener {
 		Intent i = new Intent(this, ConfigureGroupActivity.class);
 		i.putExtra("net.sf.briar.GROUP_ID", g.getId().getBytes());
 		i.putExtra("net.sf.briar.GROUP_NAME", g.getName());
+		i.putExtra("net.sf.briar.GROUP_SALT", g.getSalt());
 		i.putExtra("net.sf.briar.SUBSCRIBED", s.isSubscribed());
 		i.putExtra("net.sf.briar.VISIBLE_TO_ALL", s.isVisibleToAll());
 		startActivity(i);
-- 
GitLab