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

Commit 39072855 authored by Winson Chung's avatar Winson Chung
Browse files

Fix CTS regression in running tasks

Bug: 68773661
Test: android.app.cts.ActivityManagerTest
Test: com.android.server.am.RunningTasksTest
Change-Id: I030e2f85bb0f4c3101a805584cf0748967908508
parent 1b7c2e9f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -47,8 +47,10 @@ class RunningTasks {
    void getTasks(int maxNum, List<RunningTaskInfo> list, @ActivityType int ignoreActivityType,
            @WindowingMode int ignoreWindowingMode, SparseArray<ActivityDisplay> activityDisplays,
            int callingUid, boolean allowed) {
        // For each stack on each display, add the tasks into the sorted set and then pull the first
        // {@param maxNum} from the set
        // Return early if there are no tasks to fetch
        if (maxNum <= 0) {
            return;
        }

        // Gather all of the tasks across all of the tasks, and add them to the sorted set
        mTmpSortedSet.clear();