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

Commit bbdafbbf authored by Shivangi Dubey's avatar Shivangi Dubey Committed by dshivangi
Browse files

Separate auto-rotate action handling

Currently, system-server lacks the ability to differentiate between an incoming signal indicating a request to change the auto-rotate setting and one originating from the auto-rotate suggestion button.
This unified handling can lead to issues, particularly when the suggestion button is pressed.

A potential race condition exists where a device state change reaches system-server before the suggestion button click signal.
In such scenarios, the current implementation incorrectly locks rotation for the wrong device state as the request to freeze rotation is stale.

As a solution:
1. Distinct IPC should be established to system-server to differentiate between auto-rotate setting changes initiated from the auto-rotate tile and clicks on the auto-rotate suggestion button.
2. Upon receiving a signal from the auto-rotate suggestion button, system-server should verify if auto-rotate is still disabled.
More details: go/auto-rotate-refactor

Test: atest DisplayRotationTests RotationButtonControllerTest
Bug: 411124196
Flag: com.android.window.flags.enable_device_state_auto_rotate_setting_refactor
Change-Id: If9cd2e23690d40decc529ac411dc077945dcadaa
parent 8274f9e0
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