From 4fdf5684feebd99c4f0973db2df50be55934f5e8 Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Tue, 27 Jun 2023 17:07:13 +0000 Subject: [PATCH 1/2] 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 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:365105118220b218005225b038142273524877cc) Merged-In: If05d8841a6a940e61f71683422ef1a3d4e3597c7 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 dfea5159eb..ca9c5771b1 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; @@ -1210,14 +1211,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; @@ -1604,7 +1606,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; From 170ad5b4d61ed7df202c1633ebc00724320174cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Ciche=C5=84ski?= Date: Tue, 27 Jun 2023 02:58:26 +0000 Subject: [PATCH 2/2] Remove the keep clear areas XML tag from Hotseat It reports its size through SystemUiProxy and this tag causes it to report the region twice. Additionally upon screen rotation the value is getting updated with a delay, so for a moment two keep clear areas for Launcher are present - one from the previous orientation (on the side), and one from the current orientation (matching the proxy value in unrestrictedKeepClearAreas). Bug: 285242520 Test: before http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/cLtiXGYUyItm2kNCCEkkWA Test: after http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/iPs6fwdSXG3TE0IERmxA8 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b5b218eea929f719703ca91df6b9868645909f4c) Merged-In: I40dfe08680c944f2be5db0f6b15515492f409565 Change-Id: I40dfe08680c944f2be5db0f6b15515492f409565 --- res/layout/hotseat.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/res/layout/hotseat.xml b/res/layout/hotseat.xml index 95ebd94d0e..82b0b8d74e 100644 --- a/res/layout/hotseat.xml +++ b/res/layout/hotseat.xml @@ -21,5 +21,4 @@ android:layout_height="match_parent" android:theme="@style/HomeScreenElementTheme" android:importantForAccessibility="no" - android:preferKeepClear="true" launcher:containerType="hotseat" /> \ No newline at end of file