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

Commit 879d3ade authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

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
parents acafb3a2 26c4e23e
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -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(),
                mOpenHelper.mBackupTableExists = tableExists(mOpenHelper.getReadableDatabase(),
                        Favorites.BACKUP_TABLE_NAME);
                }
                return null;
            }
            case LauncherSettings.Settings.METHOD_RESTORE_BACKUP_TABLE: {
@@ -454,12 +450,8 @@ 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);
    }
    }

    /**
     * Deletes any empty folder from the 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;
            }
+1 −1
Original line number Diff line number Diff line
@@ -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");