consolidate: implement (mostly) recovery mode

This commit is contained in:
Vincent Breitmoser
2014-08-20 19:34:36 +02:00
parent 9aaaac068e
commit fe1f5489ff
5 changed files with 65 additions and 47 deletions

View File

@@ -987,6 +987,11 @@ public class ProviderHelper {
log(LogLevel.DEBUG, LogType.MSG_CON_DB_CLEAR);
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");
FileImportCache<ParcelableKeyRing> cachePublic =