aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-01-16 22:48:27 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-01-16 22:48:27 +0100
commitba143a27309657ce6694b0acaf2fb34069b79313 (patch)
tree997127e2098178907aa77d45c2fd2e2267ea6cde /src/main
parent3acaec7bcd8204c92e0ffe68301645f80b5c925d (diff)
parent0b239243d9ae6c8b4bed7a40aef99a3bcd065e30 (diff)
Merge branch 'master' of github.com:siacs/Conversations
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java5
1 files changed, 4 insertions, 1 deletions
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);