add individual state for insecure encryption

This commit is contained in:
Vincent Breitmoser 2017-04-29 15:18:28 +02:00
parent 18b09b3bee
commit 524b074116
3 changed files with 9 additions and 1 deletions

View file

@ -122,6 +122,7 @@ public class MessageCryptoPresenter implements OnCryptoClickListener {
}
case ENCRYPTED_ERROR:
case ENCRYPTED_INSECURE:
case UNSUPPORTED_ENCRYPTED: {
Drawable providerIcon = getOpenPgpApiProviderIcon(messageView.getContext());
if (messageViewInfo.cryptoResultAnnotation.hasReplacementData()) {

View file

@ -125,6 +125,12 @@ public enum MessageCryptoDisplayStatus {
R.string.crypto_msg_encrypted_error
),
ENCRYPTED_INSECURE (
R.attr.openpgp_red,
R.drawable.status_lock_error,
R.string.crypto_msg_encrypted_insecure
),
INCOMPLETE_ENCRYPTED (
R.attr.openpgp_black,
R.drawable.status_lock_opportunistic,
@ -254,7 +260,7 @@ public enum MessageCryptoDisplayStatus {
return getStatusForPgpEncryptedResult(signatureResult);
case OpenPgpDecryptionResult.RESULT_INSECURE:
return ENCRYPTED_ERROR;
return ENCRYPTED_INSECURE;
}
throw new AssertionError("all cases must be handled, this is a bug!");

View file

@ -1167,6 +1167,7 @@ Please submit bug reports, contribute new features and ask questions at
<string name="crypto_msg_disabled">Message is not encrypted</string>
<string name="crypto_msg_encrypted_error">Message is encrypted, but there was a decryption error.</string>
<string name="crypto_msg_encrypted_insecure">Message is encrypted but insecure!</string>
<string name="crypto_msg_signed_error">Message is signed, but the signature could not be verified.</string>
<string name="crypto_msg_encrypted_no_provider">Message is encrypted, but no crypto app is configured.</string>
<string name="crypto_msg_unsupported_encrypted">Message is encrypted, but in an unsupported format.</string>