diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-05-08 16:52:19 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-05-08 16:52:19 +0200 |
commit | 7fa61564b83b4a9e3403974b291750286a32d451 (patch) | |
tree | 99b717b178e91a06a0b1b98c1c4b5c7118f189e6 /src/eu/siacs/conversations/ui/XmppActivity.java | |
parent | 99a56a2bde1af0e260f795a4c6fbdae63b7d5453 (diff) |
better flow after returning from openkeychain for various actions
Diffstat (limited to 'src/eu/siacs/conversations/ui/XmppActivity.java')
-rw-r--r-- | src/eu/siacs/conversations/ui/XmppActivity.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java index 70b2e24e..55dcecc9 100644 --- a/src/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/eu/siacs/conversations/ui/XmppActivity.java @@ -6,6 +6,7 @@ import eu.siacs.conversations.R; import eu.siacs.conversations.crypto.OnPgpEngineResult; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Conversation; +import eu.siacs.conversations.entities.Message; import eu.siacs.conversations.services.XmppConnectionService; import eu.siacs.conversations.services.XmppConnectionService.XmppConnectionBinder; import eu.siacs.conversations.utils.ExceptionHelper; @@ -162,7 +163,7 @@ public abstract class XmppActivity extends Activity { startActivity(viewConversationIntent); } - protected void announcePgp(final Account account) { + protected void announcePgp(final Account account, final Conversation conversation) { xmppConnectionService.getPgpEngine().generateSignature(account, "online", new OnPgpEngineResult() { @Override @@ -178,6 +179,9 @@ public abstract class XmppActivity extends Activity { public void success() { xmppConnectionService.databaseBackend.updateAccount(account); xmppConnectionService.sendPgpPresence(account, account.getPgpSignature()); + if (conversation!=null) { + conversation.setNextEncryption(Message.ENCRYPTION_PGP); + } } @Override |