From af55007a1753a12c8e31079c22da79a0a3dcdcb1 Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Sun, 22 Jan 2023 09:55:13 -0800 Subject: [PATCH] Only interrupt taskbar state during gesture. We only want to prevent updating taskbar stash state during the swipe-to-overview gesture. Previously, we were blocking all resumes into a "non-aligned-with-hotseat" state to prevent the taskbar from hiding until the gesture completed. This, however, also selected for situations where the launcher is resumed directly into Overview outside of a transition (which is triggered by some Tapl tests). This narrows the check to only when resuming into a non-interactive state (which basically just selects for BackgroundApp state). Bug: 266246618 Test: TaplTestsQuickstep on a device with taskbar Change-Id: I414ba7384f4ca3901211855b26c6c200319a2996 --- .../launcher3/taskbar/LauncherTaskbarUIController.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java index 335482c854..edb87219c4 100644 --- a/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java +++ b/quickstep/src/com/android/launcher3/taskbar/LauncherTaskbarUIController.java @@ -19,6 +19,7 @@ import static android.view.InsetsState.ITYPE_EXTRA_NAVIGATION_BAR; import static com.android.launcher3.QuickstepTransitionManager.TRANSIENT_TASKBAR_TRANSITION_DURATION; import static com.android.launcher3.config.FeatureFlags.ENABLE_TASKBAR_EDU_TOOLTIP; +import static com.android.launcher3.statemanager.BaseState.FLAG_NON_INTERACTIVE; import static com.android.launcher3.taskbar.TaskbarEduTooltipControllerKt.TOOLTIP_STEP_FEATURES; import static com.android.launcher3.taskbar.TaskbarLauncherStateController.FLAG_RESUMED; import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS; @@ -181,10 +182,12 @@ public class LauncherTaskbarUIController extends TaskbarUIController { } } + // Launcher is resumed during the swipe-to-overview gesture under shell-transitions, so + // avoid updating taskbar state in that situation (when it's non-interactive -- or + // "background") to avoid premature animations. if (ENABLE_SHELL_TRANSITIONS && isResumed + && mLauncher.getStateManager().getState().hasFlag(FLAG_NON_INTERACTIVE) && !mLauncher.getStateManager().getState().isTaskbarAlignedWithHotseat(mLauncher)) { - // Launcher is resumed, but in a state where taskbar is still independent, so - // ignore the state change. return null; }