From 48a425df95dff3c17dd4c443e57f0788ea567d1a Mon Sep 17 00:00:00 2001 From: Johannes Gallmann Date: Thu, 4 Jan 2024 16:07:19 +0100 Subject: [PATCH] Fix TaplTestsQuickstep.testPressback failure In the predictive back to home case, no WALLPAPER_OPEN_ANIMATION_FINISHED_MESSAGE event was sent to AccessibilityManagerCompat, which caused TaplTestsQuickstep.testPressback to fail. Bug: 318675970 Flag: ACONFIG com.android.systemui.predictive_back_qs_dialog_anim DEVELOPMENT Test: TaplTestsQuickstep Change-Id: I326577575d9e51e0f9ae879bca76e9c254f4ea34 --- .../android/launcher3/QuickstepTransitionManager.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index f25b652d0c..25bc0716df 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -1607,7 +1607,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener || mLauncher.getWorkspace().isOverlayShown() || shouldPlayFallbackClosingAnimation(appTargets); - boolean playWorkspaceReveal = true; + boolean playWorkspaceReveal = !fromPredictiveBack; boolean skipAllAppsScale = false; if (fromUnlock) { anim.play(getUnlockWindowAnimator(appTargets, wallpaperTargets)); @@ -1649,7 +1649,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener // targets list because it is already visible). In that case, we force // invisibility on touch down, and only reset it after the animation to home // is initialized. - if (launcherIsForceInvisibleOrOpening) { + if (launcherIsForceInvisibleOrOpening || fromPredictiveBack) { addCujInstrumentation(anim, playFallBackAnimation ? Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME_FALLBACK : Cuj.CUJ_LAUNCHER_APP_CLOSE_TO_HOME); @@ -1666,7 +1666,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener // Only register the content animation for cancellation when state changes mLauncher.getStateManager().setCurrentAnimation(anim); - if (mLauncher.isInState(LauncherState.ALL_APPS)) { + if (mLauncher.isInState(LauncherState.ALL_APPS) && !fromPredictiveBack) { Pair contentAnimator = getLauncherContentAnimator(false, LAUNCHER_RESUME_START_DELAY, skipAllAppsScale); @@ -1677,10 +1677,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener contentAnimator.second.run(); } }); - } else { - if (playWorkspaceReveal) { + } else if (playWorkspaceReveal) { anim.play(new WorkspaceRevealAnim(mLauncher, false).getAnimators()); - } } }