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

Commit 24420cc9 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Make display size of test have consistent orientation

To avoid failure on a default landscape display.

Fix: 295870419
Test: WallpaperControllerTests#testWallpaperSizeWithFixedTransform
Change-Id: I09bce1592bdf372b57209239d27850193411bf0e
parent 83a2357e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -116,8 +116,8 @@ public class WallpaperControllerTests extends WindowTestsBase {
    public void testWallpaperSizeWithFixedTransform() {
        // No wallpaper
        final DisplayContent dc = mDisplayContent;
        if (dc.mBaseDisplayHeight == dc.mBaseDisplayWidth) {
            // Make sure the size is different when changing orientation.
        if (dc.mBaseDisplayHeight <= dc.mBaseDisplayWidth) {
            // Make sure the display size is portrait.
            resizeDisplay(dc, 500, 1000);
        }

+1 −0
Original line number Diff line number Diff line
@@ -971,6 +971,7 @@ class WindowTestsBase extends SystemServiceTestsBase {
    static void resizeDisplay(DisplayContent displayContent, int width, int height) {
        displayContent.updateBaseDisplayMetrics(width, height, displayContent.mBaseDisplayDensity,
                displayContent.mBaseDisplayPhysicalXDpi, displayContent.mBaseDisplayPhysicalYDpi);
        displayContent.getDisplayRotation().configure(width, height);
        final Configuration c = new Configuration();
        displayContent.computeScreenConfiguration(c);
        displayContent.onRequestedOverrideConfigurationChanged(c);