summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jerry Chang <chenghsiuchang@google.com> 2023-05-05 09:29:40 +0000
committer Jerry Chang <chenghsiuchang@google.com> 2023-05-05 09:37:22 +0000
commitc6499fb8a058f73b4c3a4686e7b0d852e5d15a0c (patch)
tree940f2d5c76f589f9dd09538f5c56c772bf189b74
parent9e6c6ca843de25a488a57f62a1d945b2179576dc (diff)
Fix not showing divider when re-entering split with rotation
I134c8c4e keeps a split pair in the background, the split layout might not be updated properly if the next entering split comes with rotation. This makes sure to update the split layout to show the divider with the correct orientation. Fix: 280876344 Test: atest WMShellFlickerTests:DismissSplitScreenByGoHomeBenchmark Change-Id: I47659b791cc479b92aa1d1851663d65e8a93aeab
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java5
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java2
2 files changed, 5 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
index e7dede757578..2832c553c20c 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/SplitLayout.java
@@ -412,7 +412,10 @@ public final class SplitLayout implements DisplayInsetsController.OnInsetsChange
/** Releases and re-inflates {@link DividerView} on the root surface. */
public void update(SurfaceControl.Transaction t) {
- if (!mInitialized) return;
+ if (!mInitialized) {
+ init();
+ return;
+ }
mSplitWindowManager.release(t);
mImePositionProcessor.reset();
mSplitWindowManager.init(this, mInsetsState);
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 5c2f1438c08e..b8373f3548ca 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
@@ -1538,7 +1538,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
}
void finishEnterSplitScreen(SurfaceControl.Transaction t) {
- mSplitLayout.init();
+ mSplitLayout.update(t);
setDividerVisibility(true, t);
// Ensure divider surface are re-parented back into the hierarchy at the end of the
// transition. See Transition#buildFinishTransaction for more detail.