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

Commit c443afb5 authored by wilsonshih's avatar wilsonshih
Browse files

Only add one starting window for a task when unlock.

While unlock device, there will call showStartingWindow for every
visible activites, which is not necessary because there will only
need one starting window for each task.

Bug: 185318171
Test: atest ActivityRecordTests
Change-Id: I417e0b516de388373d49dc68f1ce6cf52dd1fd3e
parent 5496487d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2657,9 +2657,12 @@ class RootWindowContainer extends WindowContainer<DisplayContent>
    }

    void addStartingWindowsForVisibleActivities() {
        final ArrayList<Task> addedTasks = new ArrayList<>();
        forAllActivities((r) -> {
            if (r.mVisibleRequested) {
            final Task task = r.getTask();
            if (r.mVisibleRequested && r.mStartingData == null && !addedTasks.contains(task)) {
                r.showStartingWindow(true /*taskSwitch*/);
                addedTasks.add(task);
            }
        });
    }