don't show v\omemo keys as such if not enabled
This commit is contained in:
parent
c4b1f6171d
commit
b51ce43d36
|
@ -456,7 +456,7 @@ public class ContactDetailsActivity extends XmppActivity implements OnAccountUpd
|
|||
|
||||
private void onOmemoKeyClicked(Account account, String fingerprint) {
|
||||
final XmppAxolotlSession.Trust trust = account.getAxolotlService().getFingerprintTrust(fingerprint);
|
||||
if (trust != null && trust == XmppAxolotlSession.Trust.TRUSTED_X509) {
|
||||
if (Config.X509_VERIFICATION && trust != null && trust == XmppAxolotlSession.Trust.TRUSTED_X509) {
|
||||
X509Certificate x509Certificate = account.getAxolotlService().getFingerprintCertificate(fingerprint);
|
||||
if (x509Certificate != null) {
|
||||
showCertificateInformationDialog(CryptoHelper.extractCertificateInformation(x509Certificate));
|
||||
|
|
|
@ -737,14 +737,15 @@ public abstract class XmppActivity extends Activity {
|
|||
view.setOnLongClickListener(purge);
|
||||
key.setOnLongClickListener(purge);
|
||||
keyType.setOnLongClickListener(purge);
|
||||
boolean x509 = trust == XmppAxolotlSession.Trust.TRUSTED_X509 || trust == XmppAxolotlSession.Trust.INACTIVE_TRUSTED_X509;
|
||||
boolean x509 = Config.X509_VERIFICATION
|
||||
&& (trust == XmppAxolotlSession.Trust.TRUSTED_X509 || trust == XmppAxolotlSession.Trust.INACTIVE_TRUSTED_X509);
|
||||
switch (trust) {
|
||||
case UNTRUSTED:
|
||||
case TRUSTED:
|
||||
case TRUSTED_X509:
|
||||
trustToggle.setChecked(trust.trusted(), false);
|
||||
trustToggle.setEnabled(trust != XmppAxolotlSession.Trust.TRUSTED_X509);
|
||||
if (trust == XmppAxolotlSession.Trust.TRUSTED_X509) {
|
||||
trustToggle.setEnabled(!Config.X509_VERIFICATION || trust != XmppAxolotlSession.Trust.TRUSTED_X509);
|
||||
if (Config.X509_VERIFICATION && trust == XmppAxolotlSession.Trust.TRUSTED_X509) {
|
||||
trustToggle.setOnClickListener(null);
|
||||
}
|
||||
key.setTextColor(getPrimaryTextColor());
|
||||
|
|
Loading…
Reference in a new issue