Add determinte progress and foreground service for sqlcipher migration

This commit is contained in:
Moxie Marlinspike
2018-02-01 16:01:24 -08:00
parent bdd4b456c4
commit 23aee53c7d
7 changed files with 139 additions and 16 deletions

View File

@@ -78,11 +78,11 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
ClassicOpenHelper legacyHelper = new ClassicOpenHelper(context);
android.database.sqlite.SQLiteDatabase legacyDb = legacyHelper.getWritableDatabase();
SQLCipherMigrationHelper.migratePlaintext(legacyDb, db);
SQLCipherMigrationHelper.migratePlaintext(context, legacyDb, db);
MasterSecret masterSecret = KeyCachingService.getMasterSecret(context);
if (masterSecret != null) SQLCipherMigrationHelper.migrateCiphertext(context, masterSecret, legacyDb, db);
if (masterSecret != null) SQLCipherMigrationHelper.migrateCiphertext(context, masterSecret, legacyDb, db, null);
else TextSecurePreferences.setNeedsSqlCipherMigration(context, true);
}
}