diff options
| author | 2023-04-06 15:17:10 +0800 | |
|---|---|---|
| committer | 2023-04-06 15:17:10 +0800 | |
| commit | 3a68b02623da338752c609016c49b8536b8ef5fb (patch) | |
| tree | 9befe2d2f5243b0896903105ea9d928d367b6374 | |
| parent | 2e07598039cc14de8d4f8cd87a787073d7fd2313 (diff) | |
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
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java | 4 |
1 files changed, 4 insertions, 0 deletions
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 f159f54aa825..77939c7c6964 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 @@ -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(); |