Merge "Polish home-key from split to pip transition" into udc-dev am: ca08d75e4a am: 93551e9496

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23833485

Change-Id: I6d23eca98f12691d3f87af8fedf8049f27125194
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hongwei Wang
2023-06-29 17:56:29 +00:00
committed by Automerger Merge Worker
@@ -18,6 +18,7 @@ package com.android.launcher3;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME; import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.app.WindowConfiguration.ACTIVITY_TYPE_STANDARD; 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.provider.Settings.Secure.LAUNCHER_TASKBAR_EDUCATION_SHOWING;
import static android.view.RemoteAnimationTarget.MODE_CLOSING; import static android.view.RemoteAnimationTarget.MODE_CLOSING;
import static android.view.RemoteAnimationTarget.MODE_OPENING; import static android.view.RemoteAnimationTarget.MODE_OPENING;
@@ -1210,14 +1211,15 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
return false; return false;
} }
private boolean hasMultipleTargetsWithMode(RemoteAnimationTarget[] targets, int mode) { private boolean shouldPlayFallbackClosingAnimation(RemoteAnimationTarget[] targets) {
int numTargets = 0; int numTargets = 0;
for (RemoteAnimationTarget target : targets) { for (RemoteAnimationTarget target : targets) {
if (target.mode == mode) { if (target.mode == MODE_CLOSING) {
numTargets++; numTargets++;
} if (numTargets > 1 || target.windowConfiguration.getWindowingMode()
if (numTargets > 1) { == WINDOWING_MODE_MULTI_WINDOW) {
return true; return true;
}
} }
} }
return false; return false;
@@ -1604,7 +1606,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
boolean playFallBackAnimation = (launcherView == null boolean playFallBackAnimation = (launcherView == null
&& launcherIsForceInvisibleOrOpening) && launcherIsForceInvisibleOrOpening)
|| mLauncher.getWorkspace().isOverlayShown() || mLauncher.getWorkspace().isOverlayShown()
|| hasMultipleTargetsWithMode(appTargets, MODE_CLOSING); || shouldPlayFallbackClosingAnimation(appTargets);
boolean playWorkspaceReveal = true; boolean playWorkspaceReveal = true;
boolean skipAllAppsScale = false; boolean skipAllAppsScale = false;