diff options
author | 2023-08-16 12:26:00 +0000 | |
---|---|---|
committer | 2023-08-16 12:26:00 +0000 | |
commit | 02b833c20a6daa156f31c8930a7c0b5192b886f6 (patch) | |
tree | fec46f6b8b510af66620379685fe2bdbbda5e5bf | |
parent | 7920f3ad3840c423da28142e80314e2ca0e6939c (diff) | |
parent | 4187972d48bddbd756636a20ce327b76a91838ba (diff) |
Merge "Fix testRespectTopFullscreenOrientation failed on tablet" into main
-rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java | 3 | ||||
-rw-r--r-- | services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java index 3eed0b72e0bb..302ad7f33b7c 100644 --- a/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java +++ b/services/tests/wmtests/src/com/android/server/wm/ActivityRecordTests.java @@ -2719,6 +2719,9 @@ public class ActivityRecordTests extends WindowTestsBase { assertEquals(Configuration.ORIENTATION_PORTRAIT, displayConfig.orientation); assertEquals(Configuration.ORIENTATION_PORTRAIT, activityConfig.orientation); + // Unblock the rotation animation, so the further orientation updates won't be ignored. + unblockDisplayRotation(activity.mDisplayContent); + final ActivityRecord topActivity = createActivityRecord(activity.getTask()); topActivity.setOrientation(SCREEN_ORIENTATION_LANDSCAPE); diff --git a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java index 3b7362e258c8..ae7b161dea16 100644 --- a/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java +++ b/services/tests/wmtests/src/com/android/server/wm/WindowTestsBase.java @@ -963,6 +963,8 @@ class WindowTestsBase extends SystemServiceTestsBase { * @see DisplayRotation#updateRotationUnchecked */ void unblockDisplayRotation(DisplayContent dc) { + dc.mOpeningApps.clear(); + mWm.mAppsFreezingScreen = 0; mWm.stopFreezingDisplayLocked(); // The rotation animation won't actually play, it needs to be cleared manually. dc.setRotationAnimation(null); |