summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nataniel Borges <natanieljr@google.com> 2023-04-21 13:19:50 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-04-21 13:19:50 +0000
commit54d018e1de00c3f952259a60a11530be4b770c96 (patch)
tree715b27531bd19b3218acb51c6f116998f174b434
parent4cf16072751f52f1c5e53c9699d710fcf73daeb4 (diff)
parent496fd6a64a0d354e05b286ea6a0b30200837f676 (diff)
Merge "Only need to dismiss stage if one of the task is closed." into udc-dev
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java5
1 files changed, 3 insertions, 2 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 ceef373182fa..cca63ef2b5d6 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
@@ -2419,12 +2419,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
}
}
}
- // If the size of dismissStages > 0, the task is closed without prepare pending
+ // If the size of dismissStages == 1, one of the task is closed without prepare pending
// transition, which could happen if all activities were finished after finish top
// activity in a task, so the trigger task is null when handleRequest.
+ // Note if the size of dismissStages == 2, it's starting a new task, so don't handle it.
final ArraySet<StageTaskListener> dismissStages = record.getShouldDismissedStage();
if (mMainStage.getChildCount() == 0 || mSideStage.getChildCount() == 0
- || dismissStages.size() > 0) {
+ || dismissStages.size() == 1) {
Log.e(TAG, "Somehow removed the last task in a stage outside of a proper "
+ "transition.");
final WindowContainerTransaction wct = new WindowContainerTransaction();