ambient: handle suspend case better
Previously ambient mode will trigger lockscreen on screen dimm and then rely on lock screen idle to show screen saver. This works in some cases, but in suspend case the time between screen dim and cpu suspend is too short. Screen saver was not able to enguage. The reason we have the set up is because the screen saver was sharing the same window constainer as the lock screen, it cannot show before lock screen is ready. Now screen saver has its own window container, we changed the flow to show ambient mode immediately when idle. This will prevent cpu suspend because screen saver will take a wake lock if charging. Screen saver will still lock the screen in the back if user reference indicated lockscreen after wake. Bug: b:169442907 Test: unitests and manual tests Change-Id: I1a5df2c58c976bba492c709e0a61dd5a6314d084 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435334Reviewed-by:Tao Wu <wutao@chromium.org> Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org> Cr-Commit-Position: refs/heads/master@{#812397}
Showing
This diff is collapsed.
Please register or sign in to comment