Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc9b7b6a authored by dshivangi's avatar dshivangi
Browse files

Fix auto-rotate suggestion button for immersive mode

The refactored implementation of auto-rotate suggestion button does not take any action on-click if accelerometer_rotation is 1.
This logic worked under the assumption: auto-rotate suggestion button would only be shown if accelerometer_rotation is 0.
It is found that the assumption is not true as auto-rotate suggestion can still be shown even if accelerometer_rotation is 1.(see b/427223318)
After this change: before accepting a suggestion, use isRotationChoiceAllowed instead of just the value of accelerometer_rotation to make the decision.
This way auto-rotate suggestion acceptance logic would reflects the conditions under isRotationChoiceAllowed, and is immune to the changes in future.

Fixes: 426465490
Test: atest DisplayRotationTests
Flag: com.android.window.flags.enable_device_state_auto_rotate_setting_refactor
Change-Id: I515029fc28c5421533946c495c45781031232133
parent f70831e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment