Skip to content
Commit 338aeabc authored by Mariia Sandrikova's avatar Mariia Sandrikova
Browse files

Per-app controls for using landscape display orientation

OVERRIDE_USE_DISPLAY_LANDSCAPE_NATURAL_ORIENTATION fixes display orientation to landscape natural orientation when the following conditions are met:
- Task is in fullscreen
- Opt-out component property PROPERTY_COMPAT_ALLOW_DISPLAY_ORIENTATION_OVERRIDE isn't enabled
- ignoreOrientationRequest isn’t enabled for the display
- Natural orientation of the display is landscape

Main use case for this override are camera-using activities that are portrait-only and assume alignment with natural device orientation. Such activities can automatically be rotated with DisplayRotationCompatPolicy but not all of them can handle dynamic rotation and thus can benefit from this override.

Also, start caching other overrides in LetterboxUiController

Test: atest WmTests:LetterboxUiControllerTest
Fix: 255940284
Change-Id: I2a8688e7a033b30ea83db827679c729feaac1c9c
parent fdcb4c9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment