aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure
diff options
context:
space:
mode:
authorVincent Breitmoser <valodim@mugenguild.com>2015-04-27 14:40:52 +0200
committerVincent Breitmoser <valodim@mugenguild.com>2015-04-27 14:40:52 +0200
commit0ad66eb510772a5731fa97d1745082b43a71215e (patch)
tree6d021d46fe9ff4ec8a4b3e61d87b7aa9dcb9bd0c /OpenKeychain/src/main/java/org/sufficientlysecure
parentef8506fc26a6ba77aeba7639bfa960678efed095 (diff)
downloadopen-keychain-0ad66eb510772a5731fa97d1745082b43a71215e.tar.gz
open-keychain-0ad66eb510772a5731fa97d1745082b43a71215e.tar.bz2
open-keychain-0ad66eb510772a5731fa97d1745082b43a71215e.zip
add distinct status for messages signed by "your" key
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/DecryptFragment.java13
1 files changed, 13 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);