Use DisplayInfo rotation instead of Display#getRotation in BookStyleClosedStatePredicate
Display#getRotation could be stale as it depends on the context resources/configuration which could be deferred. onDisplayChanged callback only notifies about updates in DisplayInfo, so it doesn't notify about the configuration change update, so BookStyleClosedStatePredicate could end up with a stale rotation value. This change updates querying of the rotation to DisplayInfo's rotation field instead. Test: manual rotate => check logs, try to enter wedge mode Test: atest BookStyleDeviceStatePolicyTest Bug: 326802066 Change-Id: I89514a383f5627e92b83dca110d9f850a0bb8397 (cherry picked from commit ee512f06)
Loading
Please register or sign in to comment