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

Commit e1ee2666 authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Fix MixedDeviceOwnerTest test failure" into main

parents 2ec2440b 5f1e492e
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1253,6 +1253,11 @@ class RecentTasks {
                continue;
                continue;
            }
            }


            if (otherTask.topRunningActivity() == null) {
                // Skip if there's no running activity in the Task.
                continue;
            }

            // Stop searching if the task has higher z-ordering, or increase the index and
            // Stop searching if the task has higher z-ordering, or increase the index and
            // continue the search.
            // continue the search.
            if (task.compareTo(otherTask) > 0) {
            if (task.compareTo(otherTask) > 0) {
+4 −2
Original line number Original line Diff line number Diff line
@@ -1210,9 +1210,11 @@ public class RecentTasksTest extends WindowTestsBase {
    @Test
    @Test
    public void addTask_tasksAreAddedAccordingToZOrder() {
    public void addTask_tasksAreAddedAccordingToZOrder() {
        final Task firstTask = new TaskBuilder(mSupervisor).setTaskId(1)
        final Task firstTask = new TaskBuilder(mSupervisor).setTaskId(1)
                .setWindowingMode(WINDOWING_MODE_FREEFORM).build();
                .setWindowingMode(WINDOWING_MODE_FREEFORM)
                .setCreateActivity(true).build();
        final Task secondTask = new TaskBuilder(mSupervisor).setTaskId(2)
        final Task secondTask = new TaskBuilder(mSupervisor).setTaskId(2)
                .setWindowingMode(WINDOWING_MODE_FREEFORM).build();
                .setWindowingMode(WINDOWING_MODE_FREEFORM)
                .setCreateActivity(true).build();


        assertEquals(-1, firstTask.compareTo(secondTask));
        assertEquals(-1, firstTask.compareTo(secondTask));