diff options
| author | 2025-01-24 11:48:57 -0500 | |
|---|---|---|
| committer | 2025-01-28 12:21:31 -0800 | |
| commit | 859e3323a0460f97b0efffa1c484374d98755bd1 (patch) | |
| tree | af777f2e810be0214e6c58064abdb8fc1294bf63 | |
| parent | e87ed4e203eff906554ea575e92e85647cc393ff (diff) | |
Break split on any non-active change where tasks aren't all TO_FRONT or TO_BACK
* The previous fix here (ag/31195717) regressed the original
issue where calculator and another app is open in unfolded and user
folds the device and only calculator shows up w/ half a black screen.
* Shell transitions gives us a WAKE transition in the case where we
remain unfolded and just lock/unlock the device but doesn't do so
when we fold the device. We can't specifically rely on the WAKE check.
* Now whenever split is already active, if the stages in the animation
aren't all TO_FRONT or TO_BACK we'll break split.
Test: lock/unlock case w/ calculator correctly breaks split +
fold case w/ calculator breaks split. Tried opening a link from Gmail
to ensure one stage where nothing changes and where another stage changes
doesn't break split
Flag: EXEMPT bug fix
Fixes: 387227528
Change-Id: Ib7d1a5a251af0951e8bbbab63aff81c793981f12
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java | 14 |
1 files changed, 6 insertions, 8 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 9efbf6f770b1..2e440a775387 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 @@ -3097,14 +3097,12 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, // we'll break split closingSplitTaskId = taskId; } - if (transitType == WindowManager.TRANSIT_WAKE) { - // Record which stages are receiving which changes - if ((change.getMode() == TRANSIT_TO_BACK - || change.getMode() == TRANSIT_TO_FRONT) - && (stageOfTaskId == STAGE_TYPE_MAIN - || stageOfTaskId == STAGE_TYPE_SIDE)) { - stageChanges.put(getStageOfTask(taskId), change.getMode()); - } + // Record which stages are receiving which changes + if ((change.getMode() == TRANSIT_TO_BACK + || change.getMode() == TRANSIT_TO_FRONT) + && (stageOfTaskId == STAGE_TYPE_MAIN + || stageOfTaskId == STAGE_TYPE_SIDE)) { + stageChanges.put(getStageOfTask(taskId), change.getMode()); } } |