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

Commit 46e178ec authored by Nataniel Borges's avatar Nataniel Borges Committed by Automerger Merge Worker
Browse files

Merge "Only need to dismiss stage if one of the task is closed." into udc-dev...

Merge "Only need to dismiss stage if one of the task is closed." into udc-dev am: 54d018e1 am: b22d16a1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22779458



Change-Id: I4f248a3b111ba4c9193a5023404fadf5e854884f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 5bb9a348 b22d16a1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2419,12 +2419,13 @@ public class StageCoordinator implements SplitLayout.SplitLayoutHandler,
                    }
                }
            }
            // If the size of dismissStages > 0, the task is closed without prepare pending
            // If the size of dismissStages == 1, one of the task is closed without prepare pending
            // transition, which could happen if all activities were finished after finish top
            // activity in a task, so the trigger task is null when handleRequest.
            // Note if the size of dismissStages == 2, it's starting a new task, so don't handle it.
            final ArraySet<StageTaskListener> dismissStages = record.getShouldDismissedStage();
            if (mMainStage.getChildCount() == 0 || mSideStage.getChildCount() == 0
                    || dismissStages.size() > 0) {
                    || dismissStages.size() == 1) {
                Log.e(TAG, "Somehow removed the last task in a stage outside of a proper "
                        + "transition.");
                final WindowContainerTransaction wct = new WindowContainerTransaction();