add edit button and secret key info to public key view

This commit is contained in:
Vincent Breitmoser
2014-03-08 13:17:52 +01:00
parent 7ad8977cf3
commit 706e212b6b
5 changed files with 71 additions and 2 deletions

View File

@@ -483,6 +483,12 @@ public class ProviderHelper {
return (masterKeyId > 0);
}
public static boolean hasSecretKeyByMasterKeyId(Context context, long masterKeyId) {
Uri queryUri = KeyRings.buildSecretKeyRingsByMasterKeyIdUri(Long.toString(masterKeyId));
// see if we can get our master key id back from the uri
return getMasterKeyId(context, queryUri) == masterKeyId;
}
/**
* Get master key id of keyring by its row id
*/