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
This commit is contained in:
Ming-Shin Lu
2022-05-05 18:04:56 +00:00
parent 515e58e361
commit f6778d9f41

View File

@@ -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);