From 365105118220b218005225b038142273524877cc Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Tue, 27 Jun 2023 17:07:13 +0000 Subject: [PATCH] Polish home-key from split to pip transition Includes WINDOWING_MODE_MULTI_WINDOW closing target to the condition of playing fallback animation. So the remaining splitting task won't be play with iconview animation when home-key to auto-pip consumed another splitting task in pip transition handler. Bug: 281476331 Test: repro steps of the bug Test: pass existing tests Video: http://recall/-/fLARJNt42LVxc3tt86SneW/eelqATeE1REoOtOEDxeDVR Change-Id: If05d8841a6a940e61f71683422ef1a3d4e3597c7 --- .../launcher3/QuickstepTransitionManager.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java index e5fd605904..a4a5b63833 100644 --- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java +++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java @@ -18,6 +18,7 @@ package com.android.launcher3; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD; +import static android.app.WindowConfiguration.WINDOWING_MODE_MULTI_WINDOW; import static android.provider.Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING; import static android.view.RemoteAnimationTarget.MODE_CLOSING; import static android.view.RemoteAnimationTarget.MODE_OPENING; @@ -1201,14 +1202,15 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener return false; } - private boolean hasMultipleTargetsWithMode(RemoteAnimationTarget[] targets, int mode) { + private boolean shouldPlayFallbackClosingAnimation(RemoteAnimationTarget[] targets) { int numTargets = 0; for (RemoteAnimationTarget target : targets) { - if (target.mode == mode) { + if (target.mode == MODE_CLOSING) { numTargets++; - } - if (numTargets > 1) { - return true; + if (numTargets > 1 || target.windowConfiguration.getWindowingMode() + == WINDOWING_MODE_MULTI_WINDOW) { + return true; + } } } return false; @@ -1595,7 +1597,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener boolean playFallBackAnimation = (launcherView == null && launcherIsForceInvisibleOrOpening) || mLauncher.getWorkspace().isOverlayShown() - || hasMultipleTargetsWithMode(appTargets, MODE_CLOSING); + || shouldPlayFallbackClosingAnimation(appTargets); boolean playWorkspaceReveal = true; boolean skipAllAppsScale = false;