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

Commit 7b193950 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Make display size of test have consistent orientation" into main

parents 7d5bab13 24420cc9
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);