This commit is contained in:
Dominik Schürmann 2015-05-10 11:52:39 +02:00
parent 5b1bf888b4
commit 0a29f6d3ac

View File

@ -1553,27 +1553,6 @@ public class ProviderHelper {
mContentResolver.insert(uri, values); mContentResolver.insert(uri, values);
} }
public Set<String> getAllFingerprints(Uri uri) {
Set<String> fingerprints = new HashSet<>();
String[] projection = new String[]{KeyRings.FINGERPRINT};
Cursor cursor = mContentResolver.query(uri, projection, null, null, null);
try {
if (cursor != null) {
int fingerprintColumn = cursor.getColumnIndex(KeyRings.FINGERPRINT);
while (cursor.moveToNext()) {
fingerprints.add(
KeyFormattingUtils.convertFingerprintToHex(cursor.getBlob(fingerprintColumn))
);
}
}
} finally {
if (cursor != null) {
cursor.close();
}
}
return fingerprints;
}
public byte[] getApiAppCertificate(String packageName) { public byte[] getApiAppCertificate(String packageName) {
Uri queryUri = ApiApps.buildByPackageNameUri(packageName); Uri queryUri = ApiApps.buildByPackageNameUri(packageName);