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

This commit is contained in:
Sunny Goyal
2019-09-03 16:23:18 +00:00
committed by Android (Google) Code Review

View File

@@ -173,12 +173,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");
}