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

Commit 87b25acf authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Put new Activity at frontOfTask"

parents 362028d6 dab959d4
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -1769,6 +1769,21 @@ final class ActivityStack {

        r.putInHistory();
        r.frontOfTask = newTask;
        if (!r.frontOfTask) {
            // It is possible that the current frontOfTask activity is finishing. Check for that.
            ArrayList<ActivityRecord> activities = task.mActivities;
            for (int activityNdx = 0; activityNdx < activities.size(); ++activityNdx) {
                final ActivityRecord activity = activities.get(activityNdx);
                if (activity.finishing) {
                    continue;
                }
                if (activity == r) {
                    // All activities before r are finishing.
                    r.frontOfTask = true;
                }
                break;
            }
        }
        if (!isHomeStack() || numActivities() > 0) {
            // We want to show the starting preview window if we are
            // switching to a new task, or the next activity's process is