summaryrefslogtreecommitdiff
path: root/api/api.go
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2024-01-15 10:36:05 +0000
committer Riddle Hsu <riddlehsu@google.com> 2024-01-22 14:48:02 +0000
commit1dbb239b17ca15b680c3b66bf0e3f4b3cf50a1f4 (patch)
tree1b4b5e351f2f4ec7816c9f184adaec99d1e099e7 /api/api.go
parentcdde529a1eca3bb220676c00f5a1cf8afc50ba76 (diff)
Preserve wallpaper visible state for a while when display switches
Because screen may be turned off when switching display, the wallpaper service will be notified with invisible state. And then its rendering thread could be stopped. If the size change is delivered when the renderer is not active, it won't update in time. That may cause to flicker after the display is turned on. Note that currently RWC#createSleepToken is always called on display switch no matter screen will turn on or keep off. So the invocation of onSleepingWithDisplaySwitch and onSleptOrScreenTurnedOn should be paired to consume the preserved state. The preserved visible state will be canceled by 3 conditions: 1. The display has turned on. 2. The device goes to sleep state. 3. The 1s timeout is reached. Bug: 301443073 Test: Set "always" to Continue to use apps on fold". Use live wallpaper. Fold the device while top is launcher and screen is on. The wallpaper is not flicking with old size. Change-Id: I09c630a94d39bb21388d6bedcdd3b423a060fda0
Diffstat (limited to 'api/api.go')
0 files changed, 0 insertions, 0 deletions