diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-05-12 11:30:44 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-05-13 21:52:12 +0200 |
commit | 363b290138af4ba7b70dba43bb7c022850b01c1a (patch) | |
tree | 1e86133889a583936f4cd16564530a85541abd86 /src/main/java/eu/siacs/conversations/ui | |
parent | b65a018f0009bae63f49aa27576f63ab83aabf1a (diff) |
check if pgpengine is still bound before using it
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/SetPresenceActivity.java | 2 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/XmppActivity.java | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/SetPresenceActivity.java b/src/main/java/eu/siacs/conversations/ui/SetPresenceActivity.java index effd30bf5..6d13e7eac 100644 --- a/src/main/java/eu/siacs/conversations/ui/SetPresenceActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/SetPresenceActivity.java @@ -118,7 +118,7 @@ public class SetPresenceActivity extends XmppActivity implements View.OnClickLis xmppConnectionService.changeStatus(status, statusMessage); finish(); } else if (mAccount != null) { - if (mAccount.getPgpId() == 0) { + if (mAccount.getPgpId() == 0 && hasPgp()) { xmppConnectionService.changeStatus(mAccount, status, statusMessage, true); finish(); } else { diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index 223e931a0..478bd5f05 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -547,6 +547,9 @@ public abstract class XmppActivity extends Activity { } protected boolean noAccountUsesPgp() { + if (!hasPgp()) { + return true; + } for(Account account : xmppConnectionService.getAccounts()) { if (account.getPgpId() != 0) { return false; |