Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 286d541f authored by Jerry Chang's avatar Jerry Chang
Browse files

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
parent d4768d6e
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -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);