Only show keyrings that have a valid sign key in from field, fixes #756

This commit is contained in:
mar-v-in 2014-08-12 12:57:08 +02:00
parent ae5e75f4e1
commit 4fdf9ab486

View File

@ -145,24 +145,16 @@ public class EncryptAsymmetricFragment extends Fragment implements EncryptActivi
KeyRings.MASTER_KEY_ID, KeyRings.MASTER_KEY_ID,
KeyRings.KEY_ID, KeyRings.KEY_ID,
KeyRings.USER_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 // has sign may be any subkey
KeyRings.HAS_SIGN, KeyRings.HAS_SIGN,
KeyRings.HAS_ANY_SECRET, KeyRings.HAS_ANY_SECRET
KeyRings.HAS_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 // Now create and return a CursorLoader that will take care of
// creating a Cursor for the data being displayed. // creating a Cursor for the data being displayed.
return new CursorLoader(getActivity(), baseUri, projection, where, null, null); 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 @Override