aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-09-06 19:40:28 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-09-06 19:40:28 +0200
commiteff173ebc21fd77918dfcdf5d62de938152d0895 (patch)
tree88d1648b2ea58ebca8425b10a80775d45212f3ee /src
parenta95c451f1e6ee69fbf3b0072d672c3609a4b1e7d (diff)
indicate broken pep in server info
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java4
-rw-r--r--src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java8
-rw-r--r--src/main/res/values/strings.xml1
3 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
index a8e414f0..df7f905b 100644
--- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
@@ -243,6 +243,10 @@ public class AxolotlService {
return sessions.hasAny(contactAddress);
}
+ public boolean isPepBroken() {
+ return this.pepBroken;
+ }
+
public void regenerateKeys() {
axolotlStore.regenerate();
sessions.clear();
diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
index 7b5dc9ab..4d8a5ace 100644
--- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java
@@ -29,6 +29,7 @@ import java.util.Set;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
+import eu.siacs.conversations.crypto.axolotl.AxolotlService;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.services.XmppConnectionService.OnAccountUpdate;
import eu.siacs.conversations.ui.adapter.KnownHostsAdapter;
@@ -538,7 +539,12 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
this.mServerInfoSm.setText(R.string.server_info_unavailable);
}
if (features.pep()) {
- this.mServerInfoPep.setText(R.string.server_info_available);
+ AxolotlService axolotlService = this.mAccount.getAxolotlService();
+ if (axolotlService != null && axolotlService.isPepBroken()) {
+ this.mServerInfoPep.setText(R.string.server_info_broken);
+ } else {
+ this.mServerInfoPep.setText(R.string.server_info_available);
+ }
} else {
this.mServerInfoPep.setText(R.string.server_info_unavailable);
}
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index a1394a46..5f3a587a 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -513,4 +513,5 @@
<string name="pref_use_white_background">Use white background</string>
<string name="pref_use_white_background_summary">Show received messages as black text on a white background</string>
<string name="account_status_dns_timeout">Timeout in DNS</string>
+ <string name="server_info_broken">Broken</string>
</resources>