Merge "Fix bug where we incorrectly change the default profile id of the database." into ub-launcher3-qt-qpr1-dev

am: a42681f6d2

Change-Id: I05ca0e24324272e06087221fbbb50a6dbef7ed4f
This commit is contained in:
Sunny Goyal 2019-09-03 11:17:14 -07:00 committed by android-build-merger
commit 71834aa186
1 changed files with 0 additions and 6 deletions

View File

@ -172,12 +172,6 @@ public class RestoreDbTask {
values.put(Favorites.PROFILE_ID, newProfileId);
db.update(Favorites.TABLE_NAME, values, "profileId = ?",
new String[]{Long.toString(oldProfileId)});
// Change default value of the column.
db.execSQL("ALTER TABLE favorites RENAME TO favorites_old;");
Favorites.addTableToDb(db, newProfileId, false);
db.execSQL("INSERT INTO favorites SELECT * FROM favorites_old;");
dropTable(db, "favorites_old");
}