diff options
| author | 2023-02-15 07:02:48 +0000 | |
|---|---|---|
| committer | 2023-02-15 09:53:54 +0000 | |
| commit | 286d541fee99a77e886f0536a8dc5cc672e46e5f (patch) | |
| tree | 4aa7258eca2e2184bc02637f4ce3ff77e76ecb5d | |
| parent | d4768d6e089112fa707e8ac40f7039ff94c42839 (diff) | |
Prevent cancel entering split due to animation got canceled
There are chances the entering app transition got canceled by performing
rotation transition. This checks if there is any child task existed in
split screen before fallback to cancel entering flow.
Fix: 264734862
Test: atest WMShellUnitTests
Test: repro steps of the bug
Change-Id: I7647339514b22a03051b62772c01bcec440e2046
| -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 219f87eac7f2..165226368ef3 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 @@ -450,6 +450,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) { @@ -466,7 +471,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); @@ -545,6 +550,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) { @@ -571,7 +581,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); |