diff options
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java index 01e95343d..099ed8c1f 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java @@ -91,11 +91,12 @@ public class ProviderHelper { public static final int FIELD_TYPE_STRING = 4; public static final int FIELD_TYPE_BLOB = 5; - public Object getGenericData(Uri uri, String column, int type) { + public Object getGenericData(Uri uri, String column, int type) throws NotFoundException { return getGenericData(uri, new String[]{column}, new int[]{type}).get(column); } - public HashMap<String, Object> getGenericData(Uri uri, String[] proj, int[] types) { + public HashMap<String, Object> getGenericData(Uri uri, String[] proj, int[] types) + throws NotFoundException { Cursor cursor = mContentResolver.query(uri, proj, null, null, null); HashMap<String, Object> result = new HashMap<String, Object>(proj.length); @@ -130,11 +131,13 @@ public class ProviderHelper { return result; } - public Object getUnifiedData(long masterKeyId, String column, int type) { + public Object getUnifiedData(long masterKeyId, String column, int type) + throws NotFoundException { return getUnifiedData(masterKeyId, new String[]{column}, new int[]{type}).get(column); } - public HashMap<String, Object> getUnifiedData(long masterKeyId, String[] proj, int[] types) { + public HashMap<String, Object> getUnifiedData(long masterKeyId, String[] proj, int[] types) + throws NotFoundException { return getGenericData(KeyRings.buildUnifiedKeyRingUri(Long.toString(masterKeyId)), proj, types); } |