diff options
Diffstat (limited to '')
-rw-r--r-- | build.gradle | 2 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle index 929bad9d..fd04feeb 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ repositories { dependencies { compile project(':libs:MemorizingTrustManager') - compile 'org.sufficientlysecure:openpgp-api:9.0' + compile 'org.sufficientlysecure:openpgp-api:10.0' compile 'com.soundcloud.android:android-crop:1.0.1@aar' compile 'com.android.support:support-v13:23.0.1' compile 'org.bouncycastle:bcprov-jdk15on:1.52' diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index a677e5b2..f54ace3d 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -1270,9 +1270,12 @@ public class ConversationActivity extends XmppActivity if (requestCode == REQUEST_DECRYPT_PGP) { mConversationFragment.onActivityResult(requestCode, resultCode, data); } else if (requestCode == REQUEST_CHOOSE_PGP_ID) { + // the user chose OpenPGP for encryption and selected his key in the PGP provider if (xmppConnectionServiceBound) { if (data.getExtras().containsKey(OpenPgpApi.EXTRA_SIGN_KEY_ID)) { + // associate selected PGP keyId with the account mSelectedConversation.getAccount().setPgpSignId(data.getExtras().getLong(OpenPgpApi.EXTRA_SIGN_KEY_ID)); + // we need to announce the key as described in XEP-027 announcePgp(mSelectedConversation.getAccount(), null); } else { choosePgpSignId(mSelectedConversation.getAccount()); @@ -1283,7 +1286,7 @@ public class ConversationActivity extends XmppActivity } } else if (requestCode == REQUEST_ANNOUNCE_PGP) { if (xmppConnectionServiceBound) { - announcePgp(mSelectedConversation.getAccount(), null); + announcePgp(mSelectedConversation.getAccount(), mSelectedConversation); this.mPostponedActivityResult = null; } else { this.mPostponedActivityResult = new Pair<>(requestCode, data); |