From 4fdf9ab48608c02e7673cacd20e732fb9eaa08a7 Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Tue, 12 Aug 2014 12:57:08 +0200 Subject: [PATCH] Only show keyrings that have a valid sign key in from field, fixes #756 --- .../keychain/ui/EncryptAsymmetricFragment.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptAsymmetricFragment.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptAsymmetricFragment.java index 3de617ca0..67adbc136 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptAsymmetricFragment.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/EncryptAsymmetricFragment.java @@ -145,24 +145,16 @@ public class EncryptAsymmetricFragment extends Fragment implements EncryptActivi KeyRings.MASTER_KEY_ID, KeyRings.KEY_ID, KeyRings.USER_ID, - KeyRings.EXPIRY, - KeyRings.IS_REVOKED, - // can certify info only related to master key - KeyRings.CAN_CERTIFY, // has sign may be any subkey KeyRings.HAS_SIGN, - KeyRings.HAS_ANY_SECRET, - KeyRings.HAS_SECRET + KeyRings.HAS_ANY_SECRET }; - String where = KeyRings.HAS_ANY_SECRET + " = 1"; + String where = KeyRings.HAS_ANY_SECRET + " = 1 AND " + KeyRings.HAS_SIGN + " NOT NULL"; // Now create and return a CursorLoader that will take care of // creating a Cursor for the data being displayed. return new CursorLoader(getActivity(), baseUri, projection, where, null, null); - /*return new CursorLoader(getActivity(), KeyRings.buildUnifiedKeyRingsUri(), - new String[]{KeyRings.USER_ID, KeyRings.KEY_ID, KeyRings.MASTER_KEY_ID, KeyRings.HAS_ANY_SECRET}, SIGN_KEY_SELECTION, - null, null);*/ } @Override