allow database downgrade for debug builds
This commit is contained in:
@@ -320,6 +320,10 @@ public class KeychainDatabase extends SQLiteOpenHelper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||||
|
// Downgrade is ok for the debug version, makes it easier to work with branches
|
||||||
|
if (Constants.DEBUG) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// NOTE: downgrading the database is explicitly not allowed to prevent
|
// NOTE: downgrading the database is explicitly not allowed to prevent
|
||||||
// someone from exploiting old bugs to export the database
|
// someone from exploiting old bugs to export the database
|
||||||
throw new RuntimeException("Downgrading the database is not allowed!");
|
throw new RuntimeException("Downgrading the database is not allowed!");
|
||||||
|
|||||||
Reference in New Issue
Block a user