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

Commit bf9725ca authored by dshivangi's avatar dshivangi
Browse files

Implement Controller to maintain consistency in Auto rotate settings for foldables

Implement DeviceStateAutoRotateSettingController, which is responsible for:
- Takes requests to update DEVICE_STATE_AUTO_ROTATE and ACCELEROMETER_ROTATION settings, and writes into persisted settings synchronously if the request is valid.
- Handles conflicts between incoming requests and changes, and keeps the values consistent.
- Maintains in-memory copy of the values of settings and device state.
- When it requests DEVICE_STATE_AUTO_ROTATE setting value from DeviceStateAutoRotateSettingManager, and it receives null, this class will update the persisted setting to the default value.

Follow-up CL: Handle device state being missing until we receive first device state update
For more info: go/auto-rotate-refactor

Test: atest DeviceStateAutoRotateSettingControllerTests
Bug: 406444989
Flag: com.android.window.flags.enable_device_state_auto_rotate_setting_refactor
Change-Id: If4a0515caf2dd38917e8ec8b9050bd90f1ee409a
parent 28118aff
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