From 9e03601a090208a8c7bbfc8071b53b3d97a85850 Mon Sep 17 00:00:00 2001 From: Jerry Chang Date: Thu, 1 Jun 2023 08:27:19 +0000 Subject: [PATCH] Fix not auto pip after swipe split pair to home Rollback part of Ia4e0b5f7 to not reparent child task when finishing recent transition to prevent it interfers with finishTransition operations in wm-core. So it can check to file entering pip transition when needed. Fix: 279362184 Bug: 280387453 Test: atest WMShellUnitTests WMShellFlickerTests Test: repro steps of the bug Change-Id: Ibc3fedb7c925de8fc92fde212922f5cf12d94915 --- .../src/com/android/wm/shell/splitscreen/StageCoordinator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 b2526ee97a210..7a531bea44f7d 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 @@ -2886,7 +2886,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, } setSplitsVisible(false); - prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, finishWct); + finishWct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token, + true /* reparentLeafTaskIfRelaunch */); logExit(EXIT_REASON_UNKNOWN); }