Explicitly update split stage visibility when split breaks on fold
* Divider bar was added to recents transition because StageCoordinator
was incorrectly reporting split screen as visible after we break split
on fold+unlock.
* That bad reporting resulted in using a mixed handler for split + recents
which then adds the divider bar to the transition.
* We correctly receive an onTaskVanished(), however we explicitly prevent
a call to sendStatusChanged() if we're using shell transitions, otherwise
that may have updated state accordingly
Test: Repro doesn't show divider bar
Subsequent split creation works as expected
Fixes: 328665238
Change-Id: If150e7d6fd3ce58547347fddb3d613911de92568
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 82ef422..1d26478 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
@@ -1524,6 +1524,7 @@
prepareExitSplitScreen(mTopStageAfterFoldDismiss, wct);
mSplitTransitions.startDismissTransition(wct, this,
mTopStageAfterFoldDismiss, EXIT_REASON_DEVICE_FOLDED);
+ setSplitsVisible(false);
} else {
exitSplitScreen(
mTopStageAfterFoldDismiss == STAGE_TYPE_MAIN ? mMainStage : mSideStage,