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

Commit b614581c authored by Ben Lin's avatar Ben Lin Committed by Android (Google) Code Review
Browse files

Merge "Sync mLastLeafTaskToFrontId to moveTaskToFront callback." into main

parents cfc21b60 829852a7
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -414,14 +414,15 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {

        if (!toTop) {
            if (t.mTaskId == mLastLeafTaskToFrontId) {
                mLastLeafTaskToFrontId = INVALID_TASK_ID;

                // If the previous front-most task is moved to the back, then notify of the new
                // front-most task.
                final ActivityRecord topMost = getTopNonFinishingActivity();
                if (topMost != null) {
                    mAtmService.getTaskChangeNotificationController().notifyTaskMovedToFront(
                            topMost.getTask().getTaskInfo());
                    mLastLeafTaskToFrontId = topMost.getTask().mTaskId;
                } else {
                    mLastLeafTaskToFrontId = INVALID_TASK_ID;
                }
            }
            return;