Merge "Add FeatureFlag for ENABLE_FOUR_COLUMNS."
This commit is contained in:
committed by
Android (Google) Code Review
commit
04099cdabe
@@ -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;
|
||||
}
|
||||
|
||||
@@ -190,6 +190,10 @@ 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 BooleanFlag 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.");
|
||||
|
||||
public static void initialize(Context context) {
|
||||
synchronized (sDebugFlags) {
|
||||
for (DebugFlag flag : sDebugFlags) {
|
||||
|
||||
Reference in New Issue
Block a user