From 6d3a1d8f50c55b448f692968d3b621bda6942614 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Sun, 5 May 2024 18:18:17 -0700 Subject: [PATCH] Update SUW swipe home logic for taskbar stashing - Reverted the previous change. It doesn't fix the issue when launching setup mode with command line. The fact that it looked as if it's fixed from factory reset might be a fluke - Found out that we unstash the task bar to home from setup somewhere in TaskbarStashController. This is related to stashed alpha only. Fixes: 337738795 Test: Finish setup, swipe home in folded, and observe home handle is visible. Change-Id: I04daf41ae9a1c3b7e6e4962dd4a8c62b708e0a54 (cherry picked from commit b297d4fb83f5067d491c4500b608262f6b8a0790) --- .../android/launcher3/taskbar/TaskbarActivityContext.java | 3 ++- .../android/launcher3/taskbar/TaskbarStashController.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java index bc71caef62..ac5c448e6c 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java @@ -1452,7 +1452,8 @@ public class TaskbarActivityContext extends BaseTaskbarContext { ((LauncherTaskbarUIController) uiController).addLauncherVisibilityChangedAnimation( fullAnimation, duration); } - mControllers.taskbarStashController.addUnstashToHotseatAnimation(fullAnimation, duration); + mControllers.taskbarStashController.addUnstashToHotseatAnimationFromSuw(fullAnimation, + duration); View allAppsButton = mControllers.taskbarViewController.getAllAppsButtonView(); if (allAppsButton != null && !FeatureFlags.ENABLE_ALL_APPS_BUTTON_IN_HOTSEAT.get()) { diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java index a6988eed41..102fe2a489 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStashController.java @@ -357,7 +357,6 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba boolean hideTaskbar = isVisible || !mActivity.isUserSetupComplete(); updateStateForFlag(FLAG_IN_SETUP, hideTaskbar); updateStateForFlag(FLAG_STASHED_IN_APP_SETUP, hideTaskbar); - updateStateForFlag(FLAG_STASHED_SMALL_SCREEN, mActivity.isPhoneGestureNavMode()); applyState(hideTaskbar ? 0 : getStashDuration()); } @@ -549,11 +548,12 @@ public class TaskbarStashController implements TaskbarControllers.LoggableTaskba * sub-animations are properly coordinated. This duration should not * actually be used since this animation tracks a swipe progress. */ - protected void addUnstashToHotseatAnimation(AnimatorSet animation, int placeholderDuration) { + protected void addUnstashToHotseatAnimationFromSuw(AnimatorSet animation, + int placeholderDuration) { // Defer any UI updates now to avoid the UI becoming stale when the animation plays. mControllers.taskbarViewController.setDeferUpdatesForSUW(true); createAnimToIsStashed( - /* isStashed= */ false, + /* isStashed= */ mActivity.isPhoneMode(), placeholderDuration, TRANSITION_UNSTASH_SUW_MANUAL, /* jankTag= */ "SUW_MANUAL");