diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java index 754e988da6..4a0e004db3 100644 --- a/src/com/android/launcher3/InvariantDeviceProfile.java +++ b/src/com/android/launcher3/InvariantDeviceProfile.java @@ -18,7 +18,6 @@ package com.android.launcher3; 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 @@ public class InvariantDeviceProfile { 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 4754558aa1..11585f9f23 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 @@ public class LauncherAppState { 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 6331ef2862..81c841c6bc 100644 --- a/src/com/android/launcher3/config/FeatureFlags.java +++ b/src/com/android/launcher3/config/FeatureFlags.java @@ -191,10 +191,6 @@ public final class FeatureFlags { "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 final class FeatureFlags { } } - public static void removeFlag(DebugFlag flag) { - synchronized (sDebugFlags) { - sDebugFlags.remove(flag); - } - } - static List getDebugFlags() { synchronized (sDebugFlags) { return new ArrayList<>(sDebugFlags); @@ -317,15 +307,6 @@ public final class FeatureFlags { .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);