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

Commit 82765a7c authored by Riddle Hsu's avatar Riddle Hsu Committed by Automerger Merge Worker
Browse files

Merge "Merge closing transition when recents is running" into udc-dev am: c3a16230

parents 10254a25 c3a16230
Loading
Loading
Loading
Loading
+13 −0
Original line number Original line Diff line number Diff line
@@ -549,6 +549,14 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
                // are in mOpening.
                // are in mOpening.
                for (int i = 0; i < closingTasks.size(); ++i) {
                for (int i = 0; i < closingTasks.size(); ++i) {
                    final TransitionInfo.Change change = closingTasks.get(i);
                    final TransitionInfo.Change change = closingTasks.get(i);
                    final int pausingIdx = TaskState.indexOf(mPausingTasks, change);
                    if (pausingIdx >= 0) {
                        mPausingTasks.remove(pausingIdx);
                        didMergeThings = true;
                        ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
                                "  closing pausing taskId=%d", change.getTaskInfo().taskId);
                        continue;
                    }
                    int openingIdx = TaskState.indexOf(mOpeningTasks, change);
                    int openingIdx = TaskState.indexOf(mOpeningTasks, change);
                    if (openingIdx < 0) {
                    if (openingIdx < 0) {
                        Slog.w(TAG, "Closing a task that wasn't opening, this may be split or"
                        Slog.w(TAG, "Closing a task that wasn't opening, this may be split or"
@@ -601,6 +609,11 @@ public class RecentsTransitionHandler implements Transitions.TransitionHandler {
                didMergeThings = true;
                didMergeThings = true;
                mState = STATE_NEW_TASK;
                mState = STATE_NEW_TASK;
            }
            }
            if (mPausingTasks.isEmpty()) {
                // The pausing tasks may be removed by the incoming closing tasks.
                ProtoLog.v(ShellProtoLogGroup.WM_SHELL_RECENTS_TRANSITION,
                        "[%d] RecentsController.merge: empty pausing tasks", mInstanceId);
            }
            if (!hasTaskChange) {
            if (!hasTaskChange) {
                // Activity only transition, so consume the merge as it doesn't affect the rest of
                // Activity only transition, so consume the merge as it doesn't affect the rest of
                // recents.
                // recents.