mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-27 11:12:15 -05:00
add distinct status for messages signed by "your" key
This commit is contained in:
parent
8dbb82a8b6
commit
40834d1fcd
@ -231,6 +231,7 @@ public abstract class DecryptFragment extends CryptoOperationFragment implements
|
||||
KeychainContract.KeyRings.IS_REVOKED,
|
||||
KeychainContract.KeyRings.IS_EXPIRED,
|
||||
KeychainContract.KeyRings.VERIFIED,
|
||||
KeychainContract.KeyRings.HAS_ANY_SECRET,
|
||||
};
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@ -239,6 +240,7 @@ public abstract class DecryptFragment extends CryptoOperationFragment implements
|
||||
static final int INDEX_IS_REVOKED = 3;
|
||||
static final int INDEX_IS_EXPIRED = 4;
|
||||
static final int INDEX_VERIFIED = 5;
|
||||
static final int INDEX_HAS_ANY_SECRET = 6;
|
||||
|
||||
@Override
|
||||
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
|
||||
@ -283,6 +285,7 @@ public abstract class DecryptFragment extends CryptoOperationFragment implements
|
||||
boolean isRevoked = data.getInt(INDEX_IS_REVOKED) != 0;
|
||||
boolean isExpired = data.getInt(INDEX_IS_EXPIRED) != 0;
|
||||
boolean isVerified = data.getInt(INDEX_VERIFIED) > 0;
|
||||
boolean isYours = data.getInt(INDEX_HAS_ANY_SECRET) != 0;
|
||||
|
||||
if (isRevoked) {
|
||||
mSignatureText.setText(R.string.decrypt_result_signature_revoked_key);
|
||||
@ -302,6 +305,16 @@ public abstract class DecryptFragment extends CryptoOperationFragment implements
|
||||
|
||||
onVerifyLoaded(true);
|
||||
|
||||
} else if (isYours) {
|
||||
|
||||
mSignatureText.setText(R.string.decrypt_result_signature_secret);
|
||||
KeyFormattingUtils.setStatusImage(getActivity(), mSignatureIcon, mSignatureText, State.VERIFIED);
|
||||
|
||||
setSignatureLayoutVisibility(View.VISIBLE);
|
||||
setShowAction(signatureKeyId);
|
||||
|
||||
onVerifyLoaded(true);
|
||||
|
||||
} else if (isVerified) {
|
||||
mSignatureText.setText(R.string.decrypt_result_signature_certified);
|
||||
KeyFormattingUtils.setStatusImage(getActivity(), mSignatureIcon, mSignatureText, State.VERIFIED);
|
||||
|
@ -287,6 +287,7 @@
|
||||
<string name="decrypt_result_no_signature">"Not Signed"</string>
|
||||
<string name="decrypt_result_invalid_signature">"Invalid signature!"</string>
|
||||
<string name="decrypt_result_signature_uncertified">"Signed by <b>unconfirmed</b> key"</string>
|
||||
<string name="decrypt_result_signature_secret">"Signed by your key"</string>
|
||||
<string name="decrypt_result_signature_certified">"Signed by confirmed key"</string>
|
||||
<string name="decrypt_result_signature_expired_key">"Signed by <b>expired</b> key!"</string>
|
||||
<string name="decrypt_result_signature_revoked_key">"Signed by <b>revoked</b> key!"</string>
|
||||
|
Loading…
Reference in New Issue
Block a user