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

Add a way to disable auto rotation for immersive apps

Provide a way to always show a rotation button instead of auto rotating for immersive applications when the following conditions are met:
1) Top activity requests to hide status and navigation bars
2) Top activity is fullscreen and in optimal orientation (without letterboxing)
3) Rotation will lead to letterboxing due to fixed orientation.
4) ignoreOrientationRequest is enabled and config_letterboxIsDisplayRotationImmersiveAppCompatPolicyEnabled is enabled

This is needed because immersive apps, such as games, are often not optimized for all orientations and can have a poor UX when rotated. Additionally, some games relying on sensors for the gameplay so users can trigger such rotations accidentally when auto rotation is on.

Test: atest LetterboxConfigurationDeviceConfigTests DisplayRotationCompatPolicyForImmersiveAppsTests
Bug: 251404186
Change-Id: I0b5d8f666b8bec9bd9d6fb5303986d3c288e283f
Merged-In: I0b5d8f666b8bec9bd9d6fb5303986d3c288e283f
parent bc2a6556
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