From 08f9a5878d03deb4e4d9bbb294e53a38f390775c Mon Sep 17 00:00:00 2001 From: Tony Wickham Date: Tue, 14 Apr 2020 10:24:24 -0500 Subject: [PATCH] Don't scale workspace when going to all apps if ENABLE_OVERVIEW_ACTIONS Before the two-zone model introduced with ENABLE_OVERVIEW_ACTIONS, we scaled down the workspace when swiping up, since you could pause at any time to go to overview (which has workspace scaled down behind it). But in the two-zone model, that scaling is potentially confusing since it looks similar to the HintState (when swiping from the nav bar). Bug: 143361609 Change-Id: I3ee9f6eb45abb0123563d283a3145f27c3a63dd5 --- .../android/launcher3/uioverrides/states/AllAppsState.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java b/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java index 93e02a111f..8e002d0ea3 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java +++ b/quickstep/src/com/android/launcher3/uioverrides/states/AllAppsState.java @@ -16,6 +16,8 @@ package com.android.launcher3.uioverrides.states; import static com.android.launcher3.anim.Interpolators.DEACCEL_2; +import static com.android.launcher3.config.FeatureFlags.ENABLE_OVERVIEW_ACTIONS; +import static com.android.quickstep.SysUINavigationMode.Mode.NO_BUTTON; import android.content.Context; @@ -76,7 +78,7 @@ public class AllAppsState extends LauncherState { public ScaleAndTranslation getWorkspaceScaleAndTranslation(Launcher launcher) { ScaleAndTranslation scaleAndTranslation = LauncherState.OVERVIEW .getWorkspaceScaleAndTranslation(launcher); - if (SysUINavigationMode.getMode(launcher) == SysUINavigationMode.Mode.NO_BUTTON) { + if (SysUINavigationMode.getMode(launcher) == NO_BUTTON && !ENABLE_OVERVIEW_ACTIONS.get()) { float normalScale = 1; // Scale down halfway to where we'd be in overview, to prepare for a potential pause. scaleAndTranslation.scale = (scaleAndTranslation.scale + normalScale) / 2;