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 | 8 |
1 files changed, 6 insertions, 2 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 2867967ff..125f33ded 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/provider/ProviderHelper.java @@ -963,7 +963,6 @@ public class ProviderHelper { private ConsolidateResult consolidateDatabaseStep2(Progressable progress, boolean recovery) { - Preferences prefs = Preferences.getPreferences(mContext); // Set flag that we have a cached consolidation here @@ -986,7 +985,12 @@ public class ProviderHelper { // 2. wipe database (IT'S DANGEROUS) log(LogLevel.DEBUG, LogType.MSG_CON_DB_CLEAR); - new KeychainDatabase(mContext).clearDatabase(); + mContentResolver.delete(KeyRings.buildUnifiedKeyRingsUri(), null, null); + + // debug: break if this isn't recovery + if (!recovery) { + return new ConsolidateResult(ConsolidateResult.RESULT_ERROR, mLog); + } FileImportCache<ParcelableKeyRing> cacheSecret = new FileImportCache<ParcelableKeyRing>(mContext, "consolidate_secret.pcl"); |