diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-04-27 14:40:52 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-04-27 14:40:52 +0200 |
commit | 0ad66eb510772a5731fa97d1745082b43a71215e (patch) | |
tree | 6d021d46fe9ff4ec8a4b3e61d87b7aa9dcb9bd0c | |
parent | ef8506fc26a6ba77aeba7639bfa960678efed095 (diff) | |
download | open-keychain-0ad66eb510772a5731fa97d1745082b43a71215e.tar.gz open-keychain-0ad66eb510772a5731fa97d1745082b43a71215e.tar.bz2 open-keychain-0ad66eb510772a5731fa97d1745082b43a71215e.zip |
add distinct status for messages signed by "your" key
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java | 13 | ||||
-rw-r--r-- | OpenKeychain/src/main/res/values/strings.xml | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java index 651b56ab0..9c51893ce 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java @@ -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); diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index 666d277c3..ea226834c 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -289,6 +289,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> |