add LocalKeyStorage, don't store public keys larger than 50kb in database
This commit is contained in:
@@ -130,7 +130,7 @@ public class NfcHelper {
|
||||
try {
|
||||
long masterKeyId = mDatabaseInteractor.getCachedPublicKeyRing(dataUri)
|
||||
.extractOrGetMasterKeyId();
|
||||
mNfcKeyringBytes = mDatabaseInteractor.getPublicKeyRingData(masterKeyId);
|
||||
mNfcKeyringBytes = mDatabaseInteractor.loadPublicKeyRingData(masterKeyId);
|
||||
} catch (NotFoundException | PgpKeyNotFoundException e) {
|
||||
Log.e(Constants.TAG, "key not found!", e);
|
||||
}
|
||||
|
||||
@@ -52,6 +52,10 @@ public class ParcelableFileCache<E extends Parcelable> {
|
||||
mFilename = filename;
|
||||
}
|
||||
|
||||
public static boolean cacheFileExists(Context context, String filename) {
|
||||
return new File(context.getCacheDir(), filename).exists();
|
||||
}
|
||||
|
||||
public void writeCache(int numEntries, Iterator<E> it) throws IOException {
|
||||
DataOutputStream oos = getOutputStream();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user