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
Loading
Please register or sign in to comment