summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2023-06-13 06:51:07 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-06-13 06:51:07 +0000
commitcbc52703591113d2d216b51c4ca68492bb424052 (patch)
tree27b240f4a105d2492c4a724bab1f7039d2a5f121
parent030049aadbae0ba7c93a00e7d7df601d7214eda8 (diff)
parent0a3a98a1f792b3638ac1cff7421d7d5d085e1685 (diff)
Merge "Don't dismiss split during enter if already visible" into udc-dev am: 1f23db5438 am: 0a3a98a1f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23599662 Change-Id: I5eb577cdd9b5e44bc1eb64661b55dc7c6d7708e4 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java10
1 files changed, 7 insertions, 3 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 8708359d6dd3..a3fd048781c3 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
@@ -1516,6 +1516,10 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
// Legacy transition we need to create divider here, shell transition case we will
// create it on #finishEnterSplitScreen
mSplitLayout.init();
+ } else {
+ // We handle split visibility itself on shell transition, but sometimes we didn't
+ // reset it correctly after dismiss by some reason, so just set invisible before active.
+ setSplitsVisible(false);
}
if (taskInfo != null) {
setSideStagePosition(startPosition, wct);
@@ -2654,11 +2658,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
if (mSplitTransitions.mPendingEnter.mExtraTransitType
== TRANSIT_SPLIT_SCREEN_OPEN_TO_SIDE) {
+ // Open to side should only be used when split already active and foregorund.
if (mainChild == null && sideChild == null) {
Log.w(TAG, "Launched a task in split, but didn't receive any task in transition.");
- mSplitTransitions.mPendingEnter.cancel((cancelWct, cancelT)
- -> prepareExitSplitScreen(STAGE_TYPE_UNDEFINED, cancelWct));
- mSplitUnsupportedToast.show();
+ // This should happen when the target app is already on front, so just cancel.
+ mSplitTransitions.mPendingEnter.cancel(null);
return true;
}
} else {