diff options
| author | 2023-01-22 14:39:38 +0000 | |
|---|---|---|
| committer | 2023-01-23 22:06:11 +0000 | |
| commit | ba0b2fa370e674ebbe0ac055eb9a95df7d338013 (patch) | |
| tree | 1c2bdaacd7159802b8f57f0acbb78444e7635bd4 | |
| parent | 8027f4608d53c702ff15433c89eb10c391555d41 (diff) | |
Fix WmTests for devices with ro.bootanim.set_orientation_<display_id>
Fix: 265771023
Test: atest WmTests
Change-Id: Ia4826510181e50db26fccfe75275572e3b5577bf
| -rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/TestDisplayContent.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/tests/wmtests/src/com/android/server/wm/TestDisplayContent.java b/services/tests/wmtests/src/com/android/server/wm/TestDisplayContent.java index d31ae6aeb42a..83be4f0ac20b 100644 --- a/services/tests/wmtests/src/com/android/server/wm/TestDisplayContent.java +++ b/services/tests/wmtests/src/com/android/server/wm/TestDisplayContent.java @@ -18,6 +18,7 @@ package com.android.server.wm; import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN; import static android.view.DisplayAdjustments.DEFAULT_DISPLAY_ADJUSTMENTS; +import static android.view.Surface.ROTATION_0; import static android.view.WindowManagerPolicyConstants.NAV_BAR_BOTTOM; import static com.android.dx.mockito.inline.extended.ExtendedMockito.any; @@ -78,6 +79,12 @@ class TestDisplayContent extends DisplayContent { final InputMonitor inputMonitor = getInputMonitor(); spyOn(inputMonitor); doNothing().when(inputMonitor).resumeDispatchingLw(any()); + + // For devices that set the sysprop ro.bootanim.set_orientation_<display_id> + // See DisplayRotation#readDefaultDisplayRotation for context. + // Without that, meaning of height and width in context of the tests can be swapped if + // the default rotation is 90 or 270. + displayRotation.setRotation(ROTATION_0); } public static class Builder { |