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

Commit 183f5d82 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent a9233ab0
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