From 8b0793f9ef0eb28e6f4f3cb745cd2de24bf3551a Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 22 Jul 2022 23:23:12 +0000 Subject: [PATCH] Prevent setting max layer above the input consumer - The leash is being set to max layer above the specified layer of the recents input consumer set by WM (in InputMonitor), revert this for legacy transitions Bug: 239042246 Test: Swipe up to overview and quickly swipe again Change-Id: I92ab2ae0917857b6b1154f6250e7fac6565a58f1 --- .../com/android/quickstep/util/TaskViewSimulator.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java index c626b0ac81..6f6474eefc 100644 --- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java +++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java @@ -22,6 +22,7 @@ import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITIO import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_TOP_OR_LEFT; import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_UNDEFINED; import static com.android.launcher3.util.SplitConfigurationOptions.StagePosition; +import static com.android.quickstep.TaskAnimationManager.ENABLE_SHELL_TRANSITIONS; import static com.android.quickstep.util.RecentsOrientedState.postDisplayRotation; import static com.android.quickstep.util.RecentsOrientedState.preDisplayRotation; import static com.android.systemui.shared.system.WindowManagerWrapper.WINDOWING_MODE_FULLSCREEN; @@ -387,7 +388,14 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy { .withCornerRadius(getCurrentCornerRadius()); if (ENABLE_QUICKSTEP_LIVE_TILE.get()) { - builder.withLayer(mDrawsBelowRecents ? Integer.MIN_VALUE + 1 : Integer.MAX_VALUE); + // In legacy transitions, the animation leashes remain in same hierarchy in the + // TaskDisplayArea, so we don't want to bump the layer too high otherwise it will + // conflict with layers that WM core positions (ie. the input consumers). For shell + // transitions, the animation leashes are reparented to an animation container so we + // can bump layers as needed. + builder.withLayer(mDrawsBelowRecents + ? Integer.MIN_VALUE + 1 + : ENABLE_SHELL_TRANSITIONS ? Integer.MAX_VALUE : 0); } }