WmTests: fix natural rotation tests - #1341
Open
CeRRiLLo89 wants to merge 1 commit into
Open
Conversation
CeRRiLLo89
marked this pull request as ready for review
August 3, 2026 12:09
neobuddy89
force-pushed
the
16.0
branch
3 times, most recently
from
August 8, 2026 16:31
bf065ba to
708e793
Compare
CeRRiLLo89
force-pushed
the
fix-wmtests-get-natural-rotation
branch
from
August 12, 2026 08:37
db8bac1 to
6708631
Compare
Contributor
Author
|
Updated after the recent The branch has been rebuilt directly on the current Current PR head: The PR is now clean again:
The stable patch-id is identical to the previously validated commit, so the actual source change is unchanged. Ready for review. |
CeRRiLLo89
force-pushed
the
fix-wmtests-get-natural-rotation
branch
from
September 6, 2026 13:39
6708631 to
72b23a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getNaturalRotation()method at the three affected test sites instead of referencing it as a value.foldableConfigFalse_locksRotation_usesNaturalRotationdeterministic by configuring the fake settings provider so the current rotation is not eligible.Root cause
The test source referenced
getNaturalRotationwithout invoking it, which preventsWmTestsfrom compiling. After correcting those calls, the natural-rotation test could still selectUSE_CURRENT_ROTATIONbecause the default allowed-rotation mask includes the device's current rotation. SettingACCELEROMETER_ROTATION_ANGLESto0in the fake resolver isolates the natural-rotation branch the test is intended to cover.This changes test code only; no production behavior is modified.
Validation
Current-base build validation
Current
16.0base:71eec03efd654a4d14995b198566df9225015bb1A clean
m -j6 WmTestsbuild with this PR alone is blocked by the independent pre-existing Home-action test-source issue now tracked separately in #1349.With the #1349 Home-action patch applied temporarily for validation only,
m -j6 WmTestscompletes successfully.#1349 is independent and is not part of this PR.
Current runtime validation limitation
A fresh runtime execution on the official
raphaelROM could not be performed safely.The locally built
WmTests.apkis signed with the AOSP platform test key, while the installed official crDroid framework is signed with the crDroid platform key. The certificates were checked directly and do not match. Installation was rejected withINSTALL_FAILED_VERIFICATION_FAILURE.Therefore, 0 tests were executed during the current runtime-refresh attempt. Package verification was not bypassed.
Historical runtime validation
Before the current source rebuild, the unchanged patch was executed successfully on
raphael:DeviceStateAutoRotateSettingControllerTests: 28 passed, 0 failed.The stable patch-id remains:
2070a8f13d43430dae6e2258099e22008dab0746Validation device: Xiaomi Mi 9T Pro / Redmi K20 Pro (
raphael), Android 16.