Merge changes from topic "grid-size-migration" into ub-launcher3-rvc-dev
* changes: fix GridBackupTableTest in comply with grid size migration Turn on V2 migration algorithm feature flag
This commit is contained in:
@@ -407,12 +407,8 @@ public class LauncherProvider extends ContentProvider {
|
||||
return result;
|
||||
}
|
||||
case LauncherSettings.Settings.METHOD_REFRESH_BACKUP_TABLE: {
|
||||
// TODO(pinyaoting): Update the behavior here.
|
||||
if (!MULTI_DB_GRID_MIRATION_ALGO.get()) {
|
||||
mOpenHelper.mBackupTableExists =
|
||||
tableExists(mOpenHelper.getReadableDatabase(),
|
||||
Favorites.BACKUP_TABLE_NAME);
|
||||
}
|
||||
mOpenHelper.mBackupTableExists = tableExists(mOpenHelper.getReadableDatabase(),
|
||||
Favorites.BACKUP_TABLE_NAME);
|
||||
return null;
|
||||
}
|
||||
case LauncherSettings.Settings.METHOD_RESTORE_BACKUP_TABLE: {
|
||||
@@ -454,11 +450,7 @@ public class LauncherProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
private void onAddOrDeleteOp(SQLiteDatabase db) {
|
||||
if (MULTI_DB_GRID_MIRATION_ALGO.get()) {
|
||||
// TODO(pingyaoting): Implement the behavior here.
|
||||
} else {
|
||||
mOpenHelper.onAddOrDeleteOp(db);
|
||||
}
|
||||
mOpenHelper.onAddOrDeleteOp(db);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -682,7 +674,7 @@ public class LauncherProvider extends ContentProvider {
|
||||
}
|
||||
|
||||
protected void onAddOrDeleteOp(SQLiteDatabase db) {
|
||||
if (!MULTI_DB_GRID_MIRATION_ALGO.get() && mBackupTableExists) {
|
||||
if (mBackupTableExists) {
|
||||
dropTable(db, Favorites.BACKUP_TABLE_NAME);
|
||||
mBackupTableExists = false;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public final class FeatureFlags {
|
||||
"ENABLE_DEEP_SHORTCUT_ICON_CACHE", true, "R/W deep shortcut in IconCache");
|
||||
|
||||
public static final BooleanFlag MULTI_DB_GRID_MIRATION_ALGO = getDebugFlag(
|
||||
"MULTI_DB_GRID_MIRATION_ALGO", false, "Use the multi-db grid migration algorithm");
|
||||
"MULTI_DB_GRID_MIRATION_ALGO", true, "Use the multi-db grid migration algorithm");
|
||||
|
||||
public static final BooleanFlag ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER = getDebugFlag(
|
||||
"ENABLE_LAUNCHER_PREVIEW_IN_GRID_PICKER", true, "Show launcher preview in grid picker");
|
||||
|
||||
Reference in New Issue
Block a user