diff options
| author | 2023-06-13 06:05:14 +0000 | |
|---|---|---|
| committer | 2023-06-13 06:05:14 +0000 | |
| commit | 2c34ef5c9038f917e862669ca8daf0cf731c71b7 (patch) | |
| tree | 5743c4f2f6d941c055e91d74257c66dda1d8ed00 | |
| parent | 713fd4a15663ad4d447e7aee39009626fa4e168e (diff) | |
| parent | 1f23db5438c4e0f11de2124228db7734c2cfab6c (diff) | |
Merge "Don't dismiss split during enter if already visible" into udc-dev am: 1f23db5438
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23599662
Change-Id: I0fedb171ff34b7cb370ce2eefc0d127c88597e39
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.java | 10 |
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 9d278b721bec..79002bbb8cc6 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 @@ -1502,6 +1502,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); @@ -2642,11 +2646,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 { |