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
Loading
Please register or sign in to comment