diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/splitscreen/StageCoordinator.java | 14 |
1 files changed, 12 insertions, 2 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 0c3eaf0b904f..2a6fbd2cee8c 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 @@ -499,6 +499,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, break; } } + } else if (mSideStage.getChildCount() != 0) { + // There are chances the entering app transition got canceled by performing + // rotation transition. Checks if there is any child task existed in split + // screen before fallback to cancel entering flow. + openingToSide = true; } if (isEnteringSplit && !openingToSide) { @@ -515,7 +520,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, } } - if (!isEnteringSplit && openingToSide) { + if (!isEnteringSplit && apps != null) { final WindowContainerTransaction evictWct = new WindowContainerTransaction(); prepareEvictNonOpeningChildTasks(position, apps, evictWct); mSyncQueue.queue(evictWct); @@ -598,6 +603,11 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, break; } } + } else if (mSideStage.getChildCount() != 0) { + // There are chances the entering app transition got canceled by performing + // rotation transition. Checks if there is any child task existed in split + // screen before fallback to cancel entering flow. + openingToSide = true; } if (isEnteringSplit && !openingToSide && apps != null) { @@ -624,7 +634,7 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler, } - if (!isEnteringSplit && openingToSide) { + if (!isEnteringSplit && apps != null) { final WindowContainerTransaction evictWct = new WindowContainerTransaction(); prepareEvictNonOpeningChildTasks(position, apps, evictWct); mSyncQueue.queue(evictWct); |