Add FeatureFlag for ENABLE_FOUR_COLUMNS.

Will be paired with new device profile used to dogfood
upcoming grid changes.

Bug: 175329686
Change-Id: Iab08d9ed0dec14fd6a05c4485ac4e066533d2540
This commit is contained in:
Jon Miranda
2020-12-11 14:14:46 -08:00
parent cbf8fe08da
commit 73dcc9878d
2 changed files with 8 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ 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.APPLY_CONFIG_AT_RUNTIME;
import static com.android.launcher3.config.FeatureFlags.ENABLE_FOUR_COLUMNS;
import static com.android.launcher3.util.Executors.MAIN_EXECUTOR;
import static com.android.launcher3.util.PackageManagerHelper.getPackageFilter;
@@ -215,6 +216,9 @@ public class InvariantDeviceProfile {
}
public static String getCurrentGridName(Context context) {
if (ENABLE_FOUR_COLUMNS.get()) {
return ENABLE_FOUR_COLUMNS.key;
}
return Utilities.isGridOptionsEnabled(context)
? Utilities.getPrefs(context).getString(KEY_IDP_GRID_NAME, null) : null;
}