From f6778d9f416910ec66d015cf5aaa2b862c77a1c5 Mon Sep 17 00:00:00 2001 From: Ming-Shin Lu Date: Thu, 5 May 2022 18:04:56 +0000 Subject: Fix seeing "punch-hole" split-tasks when switching tasks from recents If split-screen task is on the overview, since it has controlled by recents remote animation, we should not dismiss split-screen, in case when taping the side task on the overview to perform launch fullscreen task transition and animating split-screen in parallel but the transition leash can't control the split-tasks because of the split-screen dismissal. Fix: 228965939 Test: manual as issue steps: 1) launch several fullscreen apps 2) enter split-screen mode from the overview 3) swipe the split-screen task to overview again 4) tap the side task to let it going to foreground 5) verify the split-screen task should keep visible and animating as well. Change-Id: Ie5463cfd3a062d1166a52951ff55b77175ee42ed --- .../Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java index f9e1b2fa4c7c..074beaa47fde 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java @@ -1444,8 +1444,9 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, // Enter overview panel, so start recent transition. mSplitTransitions.setRecentTransition(transition, request.getRemoteTransition()); - } else { - // Occluded by the other fullscreen task, so dismiss both. + } else if (mSplitTransitions.mPendingRecent == null) { + // If split-task is not controlled by recents animation + // and occluded by the other fullscreen task, dismiss both. prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, out); mSplitTransitions.setDismissTransition(transition, STAGE_TYPE_UNDEFINED, EXIT_REASON_UNKNOWN); -- cgit v1.2.3-59-g8ed1b