Remove temp logic added to migrate users to new 4x5 grid.
Related changes:
- I81a91b8415effbe0bf7ba722f11ab44a4169e3df
- Ia7ae129048bf5878b216f31f949e10c71e608818
Bug: 183965808
Bug: 175329686
Test: manual
Change-Id: If9ae69d746f1c86db98275f0c00ae054e146b67e
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index 754e988..4a0e004 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -18,7 +18,6 @@
import static com.android.launcher3.Utilities.getDevicePrefs;
import static com.android.launcher3.Utilities.getPointString;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_FOUR_COLUMNS;
import static com.android.launcher3.config.FeatureFlags.ENABLE_TWO_PANEL_HOME;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.PackageManagerHelper.getPackageFilter;
@@ -245,9 +244,6 @@
if (ENABLE_TWO_PANEL_HOME.get()) {
return ENABLE_TWO_PANEL_HOME.key;
}
- if (ENABLE_FOUR_COLUMNS.get()) {
- return ENABLE_FOUR_COLUMNS.key;
- }
return Utilities.isGridOptionsEnabled(context)
? Utilities.getPrefs(context).getString(KEY_IDP_GRID_NAME, null) : null;
}
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 4754558..11585f9 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -17,9 +17,6 @@
package com.android.launcher3;
import static com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS;
-import static com.android.launcher3.InvariantDeviceProfile.KEY_MIGRATION_SRC_HOTSEAT_COUNT;
-import static com.android.launcher3.InvariantDeviceProfile.KEY_MIGRATION_SRC_WORKSPACE_SIZE;
-import static com.android.launcher3.config.FeatureFlags.ENABLE_FOUR_COLUMNS;
import static com.android.launcher3.util.Executors.MODEL_EXECUTOR;
import static com.android.launcher3.util.SettingsCache.NOTIFICATION_BADGING_URI;
@@ -126,33 +123,6 @@
mInvariantDeviceProfile = InvariantDeviceProfile.INSTANCE.get(context);
- // b/175329686 Temporary logic to gracefully migrate group of users to the new 4x5 grid.
- String gridName = InvariantDeviceProfile.getCurrentGridName(context);
- if (ENABLE_FOUR_COLUMNS.get()
- || "reasonable".equals(gridName)
- || ENABLE_FOUR_COLUMNS.key.equals(gridName)) {
- // Reset flag and remove it from developer options to prevent it from being enabled
- // again.
- ENABLE_FOUR_COLUMNS.reset(context);
- FeatureFlags.removeFlag(ENABLE_FOUR_COLUMNS);
-
- // Force migration code to run
- Utilities.getPrefs(context).edit()
- .remove(KEY_MIGRATION_SRC_HOTSEAT_COUNT)
- .remove(KEY_MIGRATION_SRC_WORKSPACE_SIZE)
- .apply();
-
- // We make an empty call here to ensure the database is created with the old IDP grid,
- // so that when we set the new grid the migration can proceeds as expected.
- LauncherSettings.Settings.call(context.getContentResolver(), "");
-
- String newGridName = "practical";
- Utilities.getPrefs(mContext).edit().putString("idp_grid_name", newGridName).commit();
- mInvariantDeviceProfile.setCurrentGrid(context, "practical");
- } else {
- FeatureFlags.removeFlag(ENABLE_FOUR_COLUMNS);
- }
-
mIconCache = new IconCache(mContext, mInvariantDeviceProfile, iconCacheFileName);
mWidgetCache = new WidgetPreviewLoader(mContext, mIconCache);
mModel = new LauncherModel(context, this, mIconCache, new AppFilter(mContext));
diff --git a/src/com/android/launcher3/config/FeatureFlags.java b/src/com/android/launcher3/config/FeatureFlags.java
index 6331ef2..81c841c 100644
--- a/src/com/android/launcher3/config/FeatureFlags.java
+++ b/src/com/android/launcher3/config/FeatureFlags.java
@@ -191,10 +191,6 @@
"EXPANDED_SMARTSPACE", false, "Expands smartspace height to two rows. "
+ "Any apps occupying the first row will be removed from workspace.");
- public static final DeviceFlag ENABLE_FOUR_COLUMNS = new DeviceFlag(
- "ENABLE_FOUR_COLUMNS", false, "Uses 4 columns in launcher grid."
- + "Warning: This will permanently alter your home screen items and is not reversible.");
-
// TODO: b/172467144 Remove ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE feature flag.
public static final BooleanFlag ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE = new DeviceFlag(
"ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE", false, "Enables a "
@@ -234,12 +230,6 @@
}
}
- public static void removeFlag(DebugFlag flag) {
- synchronized (sDebugFlags) {
- sDebugFlags.remove(flag);
- }
- }
-
static List<DebugFlag> getDebugFlags() {
synchronized (sDebugFlags) {
return new ArrayList<>(sDebugFlags);
@@ -317,15 +307,6 @@
.getBoolean(key, defaultValue);
}
- /**
- * Resets value to default value.
- */
- public void reset(Context context) {
- mCurrentValue = defaultValue;
- context.getSharedPreferences(FLAGS_PREF_NAME, Context.MODE_PRIVATE)
- .edit().putBoolean(key, defaultValue).apply();
- }
-
@Override
protected StringBuilder appendProps(StringBuilder src) {
return super.appendProps(src).append(", mCurrentValue=").append(mCurrentValue);