preselect certify key

This commit is contained in:
Dominik Schürmann
2014-10-05 01:23:34 +02:00
parent 1dbb3db320
commit d99115c263
6 changed files with 35 additions and 14 deletions

View File

@@ -125,9 +125,9 @@ public class CachedPublicKeyRing extends KeyRing {
public boolean canCertify() throws PgpGeneralException {
try {
Object data = mProviderHelper.getGenericData(mUri,
KeychainContract.KeyRings.CAN_CERTIFY,
ProviderHelper.FIELD_TYPE_INTEGER);
return (Long) data > 0;
KeychainContract.KeyRings.HAS_CERTIFY,
ProviderHelper.FIELD_TYPE_NULL);
return !((Boolean) data);
} catch(ProviderHelper.NotFoundException e) {
throw new PgpGeneralException(e);
}