aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/crypto
diff options
context:
space:
mode:
authorAndreas Straub <andy@strb.org>2015-07-20 22:35:07 +0200
committerAndreas Straub <andy@strb.org>2015-07-20 22:35:07 +0200
commit8be0e8a27ddd4d55a48a38efc5434a581be6f1b3 (patch)
treed7d8a63599b825f0c25ec53964c6487af6a98eab /src/main/java/eu/siacs/conversations/crypto
parent4ee3f330f51383a435bf2033d8381b990a05dc60 (diff)
Start TrustKeysActivity if no keys are TRUSTED
If there are no UNDECIDED keys, but none of the contact's keys are trusted, redirect the user to the TrustKeysActivity
Diffstat (limited to 'src/main/java/eu/siacs/conversations/crypto')
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java12
1 files changed, 6 insertions, 6 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 6e28f111..72d1d14a 100644
--- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
@@ -278,8 +278,8 @@ public class AxolotlService {
mXmppConnectionService.databaseBackend.setIdentityKeyTrust(account, fingerprint, trust);
}
- public Set<IdentityKey> getContactUndecidedKeys(String bareJid) {
- return mXmppConnectionService.databaseBackend.loadIdentityKeys(account, bareJid, Trust.UNDECIDED);
+ public Set<IdentityKey> getContactUndecidedKeys(String bareJid, Trust trust) {
+ return mXmppConnectionService.databaseBackend.loadIdentityKeys(account, bareJid, trust);
}
public long getContactNumTrustedKeys(String bareJid) {
@@ -692,12 +692,12 @@ public class AxolotlService {
return axolotlStore.getIdentityKeyPair().getPublicKey();
}
- public Set<IdentityKey> getPendingKeys() {
- return axolotlStore.getContactUndecidedKeys(account.getJid().toBareJid().toString());
+ public Set<IdentityKey> getKeysWithTrust(SQLiteAxolotlStore.Trust trust) {
+ return axolotlStore.getContactUndecidedKeys(account.getJid().toBareJid().toString(), trust);
}
- public Set<IdentityKey> getPendingKeys(Contact contact) {
- return axolotlStore.getContactUndecidedKeys(contact.getJid().toBareJid().toString());
+ public Set<IdentityKey> getKeysWithTrust(SQLiteAxolotlStore.Trust trust, Contact contact) {
+ return axolotlStore.getContactUndecidedKeys(contact.getJid().toBareJid().toString(), trust);
}
public long getNumTrustedKeys(Contact contact) {