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

Commit 3a68b026 authored by Tony Huang's avatar Tony Huang
Browse files

Fix launch single task case if it under split roots

Launcher might launch single task through split, but in some flow
that task might still under split roots and cause it abnormal.
We should exit split first in such case.

Fix: 269375890
Test: manual
Test: pass existing tests
Change-Id: I713dc87a17478633db976bee656f7bb107e6e4f0
parent 2e075980
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -716,6 +716,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
        if (options1 == null) options1 = new Bundle();
        if (taskId2 == INVALID_TASK_ID) {
            // Launching a solo task.
            // Exit split first if this task under split roots.
            if (mMainStage.containsTask(taskId1) || mSideStage.containsTask(taskId1)) {
                exitSplitScreen(null /* childrenToTop */, EXIT_REASON_RECREATE_SPLIT);
            }
            ActivityOptions activityOptions = ActivityOptions.fromBundle(options1);
            activityOptions.update(ActivityOptions.makeRemoteAnimation(adapter));
            options1 = activityOptions.toBundle();