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