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
This commit is contained in:
Evan Rosky
2023-01-22 09:55:13 -08:00
parent 98a2510a48
commit af55007a17

View File

@@ -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;
}