aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ManageAccountActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-05-08 14:35:21 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-05-08 14:35:21 +0200
commit99a56a2bde1af0e260f795a4c6fbdae63b7d5453 (patch)
tree344a2ab5fabaa8923655d502ce74327c61e31907 /src/eu/siacs/conversations/ui/ManageAccountActivity.java
parent0ed29c1c77c065d73af5c9f1d7769c6c1a1a9c6f (diff)
offer to announce pgp key if pgp encryption is selected from menu
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/ManageAccountActivity.java33
1 files changed, 2 insertions, 31 deletions
diff --git a/src/eu/siacs/conversations/ui/ManageAccountActivity.java b/src/eu/siacs/conversations/ui/ManageAccountActivity.java
index db0a72b6b..8f4d9b9fe 100644
--- a/src/eu/siacs/conversations/ui/ManageAccountActivity.java
+++ b/src/eu/siacs/conversations/ui/ManageAccountActivity.java
@@ -38,8 +38,6 @@ import android.widget.ListView;
import android.widget.TextView;
public class ManageAccountActivity extends XmppActivity {
-
- public static final int REQUEST_ANNOUNCE_PGP = 0x73731;
protected boolean isActionMode = false;
protected ActionMode actionMode;
@@ -281,7 +279,7 @@ public class ManageAccountActivity extends XmppActivity {
} else if (item.getItemId()==R.id.mgmt_account_announce_pgp) {
if (activity.hasPgp()) {
mode.finish();
- announcePgp();
+ announcePgp(selectedAccountForActionMode);
}
} else if (item.getItemId() == R.id.mgmt_otr_key) {
AlertDialog.Builder builder = new AlertDialog.Builder(activity);
@@ -361,33 +359,6 @@ public class ManageAccountActivity extends XmppActivity {
}
});
}
-
- private void announcePgp() {
- final Account account = selectedAccountForActionMode;
- xmppConnectionService.getPgpEngine().generateSignature(account, "online", new OnPgpEngineResult() {
-
- @Override
- public void userInputRequried(PendingIntent pi) {
- try {
- startIntentSenderForResult(pi.getIntentSender(), REQUEST_ANNOUNCE_PGP, null, 0, 0, 0);
- } catch (SendIntentException e) {
- Log.d("xmppService","coulnd start intent for pgp anncouncment");
- }
- }
-
- @Override
- public void success() {
- xmppConnectionService.databaseBackend.updateAccount(account);
- xmppConnectionService.sendPgpPresence(account, account.getPgpSignature());
- }
-
- @Override
- public void error(OpenPgpError openPgpError) {
- // TODO Auto-generated method stub
-
- }
- });
- }
@Override
protected void onStop() {
@@ -487,7 +458,7 @@ public class ManageAccountActivity extends XmppActivity {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {
if (requestCode == REQUEST_ANNOUNCE_PGP) {
- announcePgp();
+ announcePgp(selectedAccountForActionMode);
}
}
}