summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Isak Lilja <isak.lilja@sony.com> 2023-12-06 08:57:14 +0100
committer Isak Lilja <isak.lilja@sony.com> 2024-03-04 07:43:35 +0000
commit03c1e23c87dbdaa401f588032d7b46d6dc667d20 (patch)
treef3a13014652a51eba3770571fe96054866477338
parent013acc568b60bd9107def71d4e1eb6fa8bf57721 (diff)
Don't add StageChangeRecord when stage task moves to back
We would add a StageChangeRecord for a closing task even when the task transition change was TRANSIT_TO_BACK. When both of the split stages had one child task each nothing would happen, but if one of the stages had two child tasks we would enter logic that assumed that one of stages was closed. This change adds a StageChangeRecord for a closing task only when the transition mode is TRANSIT_CLOSE. Bug: 314688953 Test: atest WMShellUnitTests Test: Open Gmail and Chrome in split, go to the compose-email screen in Gmail, receive call, answer and hang up the call, observe that Gmail and Chrome are still paired. Change-Id: I8ee6c078bd8a1816a96a9515b1a50e652de70d1c
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java3
1 files changed, 2 insertions, 1 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 c95c9f099f20..670beea5db5c 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
@@ -29,6 +29,7 @@ import static android.view.Display.DEFAULT_DISPLAY;
import static android.view.RemoteAnimationTarget.MODE_OPENING;
import static android.view.WindowManager.LayoutParams.TYPE_DOCK_DIVIDER;
import static android.view.WindowManager.TRANSIT_CHANGE;
+import static android.view.WindowManager.TRANSIT_CLOSE;
import static android.view.WindowManager.TRANSIT_KEYGUARD_OCCLUDE;
import static android.view.WindowManager.TRANSIT_TO_BACK;
import static android.view.WindowManager.TRANSIT_TO_FRONT;
@@ -2580,7 +2581,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
+ " with " + taskInfo.taskId + " before startAnimation().");
record.addRecord(stage, true, taskInfo.taskId);
}
- } else if (isClosingType(change.getMode())) {
+ } else if (change.getMode() == TRANSIT_CLOSE) {
if (stage.containsTask(taskInfo.taskId)) {
record.addRecord(stage, false, taskInfo.taskId);
Log.w(TAG, "Expected onTaskVanished on " + stage + " to have been called"