Add support to listen the proposed rotation from window manager
This exposes window-based rotation. The event is generally from WindowOrientationListener, which may use a more explicit and accurate TYPE_DEVICE_ORIENTATION sensor (currently non-public) if available. It can also consider other non-sensor information (depending on the implementation of external rotation resolver) to provide a proper rotation. So the event from it will be more reliable. Also it is easier to use because the reported value will be a specific rotation instead of raw degrees. Some use cases of android.view.OrientationEventListener can change to use this new listener if the purpose is to monitor specific rotation. Bug: 251440125 Test: atest WindowManagerTests#testProposedRotationListener Change-Id: Ia9fc52e9d22bedea4be4b8962b90d03c5b342e95
Loading
Please register or sign in to comment