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

Skip to content
Commit b9019799 authored by chaviw's avatar chaviw Committed by android-build-team Robot
Browse files

Only allow one turnScreenOn per app resume.

The current behavior will turn the screen on if a relayout is
called. This is problematic because if the screen is off but the
client is still requesting relayouts, the relayout will trigger
a request to turn the screen on. This change ensures that the screen
will only get turned on at most once per resume. If the activity
is relaunched again, the screen can be turned on again.

Fixes: 64139966
Test: go/wm-smoke
Test: Added cts test ActivityManagerActivityVisibilityTests#testTurnScreenOnActivity_WithRelayout
Test: Set the phone to have always on ambient display. Launched the
dialer app and turned the screen off. The screen no longer turns back
on automatically.

Change-Id: I5f6ac5451683d4488e72e3a6377cb3a6fd6504b2
(cherry picked from commit d3bf08da)
parent bdb3b6ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment