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

Commit 52017578 authored by Chris Li's avatar Chris Li
Browse files

Fix WindowOrganizerTests for DisplayArea#isAttached

Before, the tests passed becasue DisplayArea#isAttached always return
true. It will be changed to check if it is attached to the
RootWindowContainer after ag/14950060. Update the tests first.

Bug: 183993924
Test: atest WmTests:WindowOrganizerTests
Change-Id: I2e5c16cd4508f03d2de13bf7bdca5fe748a6cd9a
parent d38ab1f0
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ import static com.android.dx.mockito.inline.extended.ExtendedMockito.times;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
import static com.android.server.wm.ActivityRecord.State.RESUMED;
import static com.android.server.wm.DisplayArea.Type.ABOVE_TASKS;
import static com.android.server.wm.WindowContainer.POSITION_TOP;
import static com.android.server.wm.WindowContainer.SYNC_STATE_READY;

@@ -346,7 +345,7 @@ public class WindowOrganizerTests extends WindowTestsBase {
    @Test
    public void testDisplayAreaTransaction() {
        removeGlobalMinSizeRestriction();
        final DisplayArea displayArea = new DisplayArea<>(mWm, ABOVE_TASKS, "DisplayArea");
        final DisplayArea displayArea = mDisplayContent.getDefaultTaskDisplayArea();
        testTransaction(displayArea);
    }

@@ -364,7 +363,7 @@ public class WindowOrganizerTests extends WindowTestsBase {
                .setWindowingMode(WINDOWING_MODE_FREEFORM).build();
        testSetWindowingMode(rootTask);

        final DisplayArea displayArea = new DisplayArea<>(mWm, ABOVE_TASKS, "DisplayArea");
        final DisplayArea displayArea = mDisplayContent.getDefaultTaskDisplayArea();
        displayArea.setWindowingMode(WINDOWING_MODE_FREEFORM);
        testSetWindowingMode(displayArea);
    }