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

Skip to content
Commit 6f3fb7e8 authored by Nick Chameyev's avatar Nick Chameyev
Browse files

Add hidden APIs to listen for screen timeout policy to PowerManager

This is needed for DeviceStateProvider on foldable
devices to force using tent mode while there is
no timeout that makes the device to go to sleep.

This also could be used in the future for
analytics reporting to understand how often we have
screen wakelock available when switching
between displays (b/304491690).

This is hidden API to be used by system_server's
DeviceStateProvider or SystemUI.

The method will be called under a trunk stable flag.

Context for the reason of this change: currently
on book-style foldable devices we switch to the inner
display at 90 degrees instead of 0 degrees in certain
cases, such as:
- screen is rotate landscape or reverse-landscape
- device is physically lying on a flat surface or in reverse-lansdcape orientation

We want to try to add wake lock signal too as we
have received feedback from many users that they
want to prop up the device in cases like watching
vertical videos, camera app, google meet/zoom calls.

It's not an ideal signal, but it might cover
most of these scenarios.

Test: atest PowerManagerServiceTest
Test: atest NotifierTest
Bug: 363174979
Flag: EXEMPT bugfix
Change-Id: I42ada86831defe1735f45a05866fec0a828c6501
parent 63690c34
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