Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit abe2307d authored by Winson Chung's avatar Winson Chung
Browse files

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
parent 9fb566fb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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();