diff options
| author | 2021-03-30 02:36:43 +0000 | |
|---|---|---|
| committer | 2021-03-30 02:36:43 +0000 | |
| commit | 8b23eff356fbd399466a3c6e62d1f69de0f3bfe1 (patch) | |
| tree | 1491f2d044a86322a6652b994c0b2eb0b378100a /libs | |
| parent | b0c88dac5014eaf3aeb6d9d3a4a9edda95b559cb (diff) | |
| parent | 78f17f568bb7986cf4a32e609630cebe1f06fbc6 (diff) | |
Merge "Fix not able to put app in split after removed task from side stage" into sc-dev
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SideStage.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SideStage.java b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SideStage.java index e7cd38fb4bca..01a81d2ff5e0 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SideStage.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/SideStage.java @@ -40,15 +40,17 @@ class SideStage extends StageTaskListener { void addTask(ActivityManager.RunningTaskInfo task, Rect rootBounds, WindowContainerTransaction wct) { final WindowContainerToken rootToken = mRootTaskInfo.token; - wct.setHidden(rootToken, false) - .setBounds(rootToken, rootBounds) + wct.setBounds(rootToken, rootBounds) .reparent(task.token, rootToken, true /* onTop*/) // Moving the root task to top after the child tasks were repareted , or the root // task cannot be visible and focused. - .reorder(rootToken, true); + .reorder(rootToken, true /* onTop */); } boolean removeAllTasks(WindowContainerTransaction wct, boolean toTop) { + // No matter if the root task is empty or not, moving the root to bottom because it no + // longer preserves visible child task. + wct.reorder(mRootTaskInfo.token, false /* onTop */); if (mChildrenTaskInfo.size() == 0) return false; wct.reparentTasks( mRootTaskInfo.token, @@ -62,10 +64,7 @@ class SideStage extends StageTaskListener { boolean removeTask(int taskId, WindowContainerToken newParent, WindowContainerTransaction wct) { final ActivityManager.RunningTaskInfo task = mChildrenTaskInfo.get(taskId); if (task == null) return false; - - wct.setHidden(mRootTaskInfo.token, true) - .reorder(mRootTaskInfo.token, false) - .reparent(task.token, newParent, false /* onTop */); + wct.reparent(task.token, newParent, false /* onTop */); return true; } } |