aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-11-24 06:52:24 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-11-24 06:52:24 +0100
commitfbb7cb99f72a7941a65759f0c4a1b2aa9e6a04db (patch)
treed74428a4dd3e5df647e6e24f77dbaa97c773a97a /src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
parent8a1c4fe69ea1095ceef306554c7d5686796cccdb (diff)
parentc7a519498a88235488bb3a35d6220c64f7d88d0a (diff)
Merge pull request #1558 from fiaxh/pgp_api_9.0
Use OpenPGP-API 9.0
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
index ebc50566d..546be4d87 100644
--- a/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -30,6 +30,7 @@ import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate;
import eu.siacs.conversations.ui.adapter.AccountAdapter;
+import org.openintents.openpgp.util.OpenPgpApi;
public class ManageAccountActivity extends XmppActivity implements OnAccountUpdate, KeyChainAliasCallback, XmppConnectionService.OnAccountCreated {
@@ -148,7 +149,7 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
deleteAccount(selectedAccount);
return true;
case R.id.mgmt_account_announce_pgp:
- publishOpenPGPPublicKey(selectedAccount);
+ choosePgpSignId(selectedAccount);
return true;
default:
return super.onContextItemSelected(item);
@@ -311,7 +312,14 @@ public class ManageAccountActivity extends XmppActivity implements OnAccountUpda
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
- if (requestCode == REQUEST_ANNOUNCE_PGP) {
+ if (requestCode == REQUEST_CHOOSE_PGP_ID) {
+ if (data.getExtras().containsKey(OpenPgpApi.EXTRA_SIGN_KEY_ID)) {
+ selectedAccount.setPgpSignId(data.getExtras().getLong(OpenPgpApi.EXTRA_SIGN_KEY_ID));
+ announcePgp(selectedAccount, null);
+ } else {
+ choosePgpSignId(selectedAccount);
+ }
+ } else if (requestCode == REQUEST_ANNOUNCE_PGP) {
announcePgp(selectedAccount, null);
}
}