aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-01-16 21:35:38 +0100
committerDaniel Gultsch <daniel@gultsch.de>2016-01-16 21:35:38 +0100
commit0b239243d9ae6c8b4bed7a40aef99a3bcd065e30 (patch)
tree6ba22906ef85225d9b924970f829fb07adaee33f /src/main
parenta83365ee959e7d27f6abcfd0692499eaf14986fd (diff)
parenta9a3ef0f6783a235575740553daffb0d8d4c586b (diff)
Merge pull request #1655 from adithyaphilip/pgp-fix
Fixes having to choose PGP twice, upgrades openpgp-api to 10
Diffstat (limited to '')
-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);