Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de3cf7ea authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Watch 2274882: Add a field to the db when we wipe due to an error in the upgrader."

parents 0a3e94d0 6176677e
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -648,6 +648,11 @@ public class DatabaseHelper extends SQLiteOpenHelper {
            db.execSQL("DROP INDEX IF EXISTS bookmarksIndex2");
            db.execSQL("DROP TABLE IF EXISTS favorites");
            onCreate(db);

            // Added for diagnosing settings.db wipes after the fact
            String wipeReason = oldVersion + "/" + upgradeVersion + "/" + currentVersion;
            db.execSQL("INSERT INTO secure(name,value) values('" +
                    "wiped_db_reason" + "','" + wipeReason + "');");
        }
    }