diff options
author | Andreas Straub <andy@strb.org> | 2015-08-01 18:27:52 +0200 |
---|---|---|
committer | Andreas Straub <andy@strb.org> | 2015-08-01 18:30:11 +0200 |
commit | 6cd9383e53900e03d324b227c0f01b1537881148 (patch) | |
tree | 05d16b4ca4824c8590244aa086b157fee869476e /src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java | |
parent | 60cd307f73d5f31f25ba84541fbe1cce4aae2bc2 (diff) |
Let UNTRUSTED/UNDECIDED keys become INACTIVE
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java b/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java index d5959b7a..37ddf590 100644 --- a/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/TrustKeysActivity.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.Set; import eu.siacs.conversations.R; -import eu.siacs.conversations.crypto.axolotl.SQLiteAxolotlStore.Trust; +import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Conversation; @@ -119,7 +119,7 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate for(final IdentityKey identityKey : ownKeysToTrust.keySet()) { hasOwnKeys = true; addFingerprintRowWithListeners(ownKeys, contact.getAccount(), identityKey, false, - Trust.fromBoolean(ownKeysToTrust.get(identityKey)), false, + XmppAxolotlSession.Trust.fromBoolean(ownKeysToTrust.get(identityKey)), false, new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { @@ -135,7 +135,7 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate for(final IdentityKey identityKey : foreignKeysToTrust.keySet()) { hasForeignKeys = true; addFingerprintRowWithListeners(foreignKeys, contact.getAccount(), identityKey, false, - Trust.fromBoolean(foreignKeysToTrust.get(identityKey)), false, + XmppAxolotlSession.Trust.fromBoolean(foreignKeysToTrust.get(identityKey)), false, new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { @@ -171,11 +171,11 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate } private void getFingerprints(final Account account) { - Set<IdentityKey> ownKeysSet = account.getAxolotlService().getKeysWithTrust(Trust.UNDECIDED); - Set<IdentityKey> foreignKeysSet = account.getAxolotlService().getKeysWithTrust(Trust.UNDECIDED, contact); + Set<IdentityKey> ownKeysSet = account.getAxolotlService().getKeysWithTrust(XmppAxolotlSession.Trust.UNDECIDED); + Set<IdentityKey> foreignKeysSet = account.getAxolotlService().getKeysWithTrust(XmppAxolotlSession.Trust.UNDECIDED, contact); if (hasNoTrustedKeys) { - ownKeysSet.addAll(account.getAxolotlService().getKeysWithTrust(Trust.UNTRUSTED)); - foreignKeysSet.addAll(account.getAxolotlService().getKeysWithTrust(Trust.UNTRUSTED, contact)); + ownKeysSet.addAll(account.getAxolotlService().getKeysWithTrust(XmppAxolotlSession.Trust.UNTRUSTED)); + foreignKeysSet.addAll(account.getAxolotlService().getKeysWithTrust(XmppAxolotlSession.Trust.UNTRUSTED, contact)); } for(final IdentityKey identityKey : ownKeysSet) { if(!ownKeysToTrust.containsKey(identityKey)) { @@ -226,12 +226,12 @@ public class TrustKeysActivity extends XmppActivity implements OnKeyStatusUpdate for(IdentityKey identityKey:ownKeysToTrust.keySet()) { contact.getAccount().getAxolotlService().setFingerprintTrust( identityKey.getFingerprint().replaceAll("\\s", ""), - Trust.fromBoolean(ownKeysToTrust.get(identityKey))); + XmppAxolotlSession.Trust.fromBoolean(ownKeysToTrust.get(identityKey))); } for(IdentityKey identityKey:foreignKeysToTrust.keySet()) { contact.getAccount().getAxolotlService().setFingerprintTrust( identityKey.getFingerprint().replaceAll("\\s", ""), - Trust.fromBoolean(foreignKeysToTrust.get(identityKey))); + XmppAxolotlSession.Trust.fromBoolean(foreignKeysToTrust.get(identityKey))); } } |