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

Commit 38565493 authored by Shivangi Dubey's avatar Shivangi Dubey
Browse files

Disable B&R for foldables of ACCELEROMETER_ROTATION

Foldables has DEVICE_STATE_ROTATION_LOCK which stores auto-rotate setting for valid device states.
ACCELEROMETER_ROTATION setting could be different based on what device state device is in.
Eg: If the backup occurs when the device is in UNFOLDED mode and restore when device is in folded mode, ACCELEROMETER_ROTATION setting will not be restored as we expect it to be.

This change skips restoration of ACCELEROMETER_ROTATION setting if target device is a foldable.
Later ACCELEROMETER_ROTATION will be set based on device state value and restored DEVICE_STATE_ROTATION_LOCK setting in DeviceStateAutoRotateSettingController.

Fixes: 414591058
Flag: com.android.window.flags.enable_omit_accelerometer_rotation_restore
Test: Following go/br-app-developer-guide-impl#testing test if auto-rotate settings are restored as expected
Change-Id: Ifcb4cfc16b5b8a007cd220b08861b3c9961fb098
parent 2e071263
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