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

Commit 6779101b authored by Jeremy Sim's avatar Jeremy Sim Committed by Android (Google) Code Review
Browse files

Merge "Fix order invariance when checking for GroupedTaskViews" into udc-qpr-dev

parents 55405157 ca4c321f
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1369,9 +1369,15 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
            return null;
        }

        // We're looking for a taskView that matches these ids, regardless of order
        int[] taskIdsCopy = Arrays.copyOf(taskIds, taskIds.length);
        Arrays.sort(taskIdsCopy);

        for (int i = 0; i < getTaskViewCount(); i++) {
            TaskView taskView = requireTaskViewAt(i);
            if (Arrays.equals(taskIds, taskView.getTaskIds())) {
            int[] taskViewIdsCopy = taskView.getTaskIds();
            Arrays.sort(taskViewIdsCopy);
            if (Arrays.equals(taskIdsCopy, taskViewIdsCopy)) {
                return taskView;
            }
        }