Migrate ENABLE_RESPONSIVE_WORKSPACE to aconfig
- Keeping FeatureFlags.ENABLE_RESPONSIVE_WORKSPACE for local testing until aconfig is available in FlagFlipper - Still reference ENABLE_RESPONSIVE_WORKSPACE in tests as aconfig still can't be mocked Bug: 299935275 Test: manual Change-Id: I092df894a3624dca6b9d381d56ada71d807547b5
This commit is contained in:
@@ -27,3 +27,10 @@ flag {
|
||||
description: "Enables cursor hover states for certain elements."
|
||||
bug: "243191650"
|
||||
}
|
||||
|
||||
flag {
|
||||
name: "enable_responsive_workspace"
|
||||
namespace: "launcher"
|
||||
description: "Enables new workspace grid calculations method."
|
||||
bug: "241386436"
|
||||
}
|
||||
|
||||
@@ -888,7 +888,7 @@ public class InvariantDeviceProfile {
|
||||
deviceCategory = a.getInt(R.styleable.GridDisplayOption_deviceCategory,
|
||||
DEVICE_CATEGORY_ALL);
|
||||
|
||||
if (FeatureFlags.ENABLE_RESPONSIVE_WORKSPACE.get()) {
|
||||
if (FeatureFlags.enableResponsiveWorkspace()) {
|
||||
mWorkspaceSpecsId = a.getResourceId(
|
||||
R.styleable.GridDisplayOption_workspaceSpecsId, INVALID_RESOURCE_HANDLE);
|
||||
mWorkspaceSpecsTwoPanelId = a.getResourceId(
|
||||
|
||||
@@ -422,9 +422,14 @@ public final class FeatureFlags {
|
||||
// TODO(Block 31): Clean up flags
|
||||
|
||||
// TODO(Block 32): Clean up flags
|
||||
// Aconfig migration complete for ENABLE_RESPONSIVE_WORKSPACE.
|
||||
@VisibleForTesting
|
||||
public static final BooleanFlag ENABLE_RESPONSIVE_WORKSPACE = getDebugFlag(241386436,
|
||||
"ENABLE_RESPONSIVE_WORKSPACE", DISABLED,
|
||||
"Enables new workspace grid calculations method.");
|
||||
public static boolean enableResponsiveWorkspace() {
|
||||
return ENABLE_RESPONSIVE_WORKSPACE.get() || Flags.enableResponsiveWorkspace();
|
||||
}
|
||||
|
||||
// TODO(Block 33): Clean up flags
|
||||
public static final BooleanFlag ENABLE_ALL_APPS_RV_PREINFLATION = getDebugFlag(288161355,
|
||||
|
||||
Reference in New Issue
Block a user