Migrate ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT to launcher.aconfig

Flag: com.android.launcher3.enable_all_apps_button_in_hotseat
Test: N/A
Bug: 270393897
Change-Id: Ib62a2f46a440d8f0d3f569c09c4f8754715db4ee
This commit is contained in:
Jon Miranda
2024-09-16 14:58:08 -07:00
parent 98d85d6dc0
commit aec1e05be5
4 changed files with 14 additions and 2 deletions
+7
View File
@@ -405,3 +405,10 @@ flag {
description: "Show an 'Undo' snackbar when users dismiss a predicted hotseat item"
bug: "270394476"
}
flag {
name: "enable_all_apps_button_in_hotseat"
namespace: "launcher"
description: "Enables displaying the all apps button in the hotseat."
bug: "270393897"
}
@@ -1695,7 +1695,7 @@ public class TaskbarActivityContext extends BaseTaskbarContext {
duration);
View allAppsButton = mControllers.taskbarViewController.getAllAppsButtonView();
if (allAppsButton != null && !FeatureFlags.ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT.get()) {
if (allAppsButton != null && !FeatureFlags.enableAllAppsButtonInHotseat()) {
ValueAnimator alphaOverride = ValueAnimator.ofFloat(0, 1);
alphaOverride.setDuration(duration);
alphaOverride.addUpdateListener(a -> {
@@ -837,7 +837,7 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
// plays iconAlignment to 1 really fast, therefore moving the fading towards the end
// to avoid icons disappearing rather than fading out visually.
setter.setViewAlpha(child, 0, Interpolators.clampToProgress(LINEAR, 0.8f, 1f));
} else if ((isAllAppsButton && !FeatureFlags.ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT.get())
} else if ((isAllAppsButton && !FeatureFlags.enableAllAppsButtonInHotseat())
|| (isTaskbarDividerView && enableTaskbarPinning())
|| (isRecentTask && !isRecentsInHotseat)) {
if (!isToHome
@@ -257,10 +257,15 @@ public final class FeatureFlags {
}
// TODO(Block 29): Clean up flags
// Aconfig migration complete for ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT.
public static final BooleanFlag ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT = getDebugFlag(270393897,
"ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT", DISABLED,
"Enables displaying the all apps button in the hotseat.");
public static boolean enableAllAppsButtonInHotseat() {
return ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT.get() || Flags.enableAllAppsButtonInHotseat();
}
// TODO(Block 30): Clean up flags
public static final BooleanFlag USE_SEARCH_REQUEST_TIMEOUT_OVERRIDES = getDebugFlag(270395010,
"USE_SEARCH_REQUEST_TIMEOUT_OVERRIDES", DISABLED,