Separate setRotationAtAngle and Rotation Suggestion Button Flows
This commit separates the setRotationAtAngle and rotation suggestion button click flows, which were unintentionally merged. When enable_device_state_auto_rotate_setting_refactor is enabled, the isRotationChoiceAllowed check (intended exclusively for explicit user clicks on the rotation suggestion button) was incorrectly triggered by calls to RotationButtonController#setRotationAtAngle. The setRotationAtAngle method is called by the system (e.g., home screen to enforce ROTATION_0 device rotation value) to change the device's rotation. This unintended check prevented rotation changes when they were necessary. This change ensures that isRotationChoiceAllowed is evaluated only when a user explicitly clicks the rotation suggestion button, allowing setRotationAtAngle to function as intended without unnecessary checks. Fixes: 430756509 Flag: EXEMPT BUGFIX Test: atest RotationButtonControllerTest Test: Flash device with this change -> click rotation suggestion -> go to home screen -> change device state and check if rotation persists after opening an app Change-Id: I924bdbd96fc40a4c7116d2bf6ee7ec6de17996e0
Loading
Please register or sign in to comment