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

Commit 186d9dee authored by Robert Carr's avatar Robert Carr
Browse files

Fix WindowFrameTest error.

It appears somehow we are using real display sizes and it varies from
device to device. This itself is somewhat concerning, but easy enough
to handle. If you look at the line before the modified lines
it seems like this is what I meant to do initially but somehow it didn't happen.

Test: bit FrameworksServicesTests:com.android.server.wm.WindowFrameTests
Fixes: 35197592
Change-Id: I05880ba95a8ee3b790fb14daf00c878b4f85095c
parent 5bed8d17
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -338,9 +338,12 @@ public class WindowFrameTests {

        w.mDockedResizingForTest = true;
        w.calculatePolicyCrop(policyCrop);
        // But if we are docked resizing it won't be.
        // But if we are docked resizing it won't be, however we will still be
        // shrunk to the decor frame and the display.
        final DisplayInfo displayInfo = w.getDisplayContent().getDisplayInfo();
        assertRect(policyCrop, 0, 0, 1000, 1000);
        assertRect(policyCrop, 0, 0,
                Math.min(pf.width(), displayInfo.logicalWidth),
                Math.min(pf.height(), displayInfo.logicalHeight));
    }

    private WindowStateWithTask createWindow(Task task, int width, int height) {