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
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user