From abe2307d78df88dc43cbc4431eee483e5e7a8235 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 28 Sep 2023 07:29:40 +0000 Subject: Ensure we reset reparenting when launching new splits - Follow up to ag/24812535, there were a few cases where we don't call into prepareEnterSplit() but still need to reset the reparenting state to prevent trampolines from breaking splitscreen upon entering. Fixes: 292454704 Test: Launch split from the menu for app that launches a trampoline Change-Id: Ia0d825192c3ec78991a75f0501e7ece9d75cb4af --- .../Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java | 4 ++++ 1 file changed, 4 insertions(+) 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 8efdfd6ca1e1..3b1801b8d821 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 @@ -718,6 +718,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, mSplitLayout.setDivideRatio(splitRatio); updateWindowBounds(mSplitLayout, wct); wct.reorder(mRootTaskInfo.token, true); + wct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token, + false /* reparentLeafTaskIfRelaunch */); setRootForceTranslucent(false, wct); // Make sure the launch options will put tasks in the corresponding split roots @@ -765,6 +767,8 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, mSplitLayout.setDivideRatio(splitRatio); updateWindowBounds(mSplitLayout, wct); wct.reorder(mRootTaskInfo.token, true); + wct.setReparentLeafTaskIfRelaunch(mRootTaskInfo.token, + false /* reparentLeafTaskIfRelaunch */); setRootForceTranslucent(false, wct); options1 = options1 != null ? options1 : new Bundle(); -- cgit v1.2.3-59-g8ed1b