forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arc: Add wake lock based logic to re-suspend after dark resume
This change adds functionality to support lock screen notifications for Android. The wake lock module now listens to dark resume notifications from the power manager. It - 1. Starts a timer to check for partial wake locks acquired by Android. 2. After the timer in 1 expires, if no partial wake lock is acquired the power manager is requested to re-suspend the system. If a partial wake lock is acquired, then another hard timeout timer is set and also an observer to wake lock release is set. 3. If wake lock is released, the system is re-suspended immediately. 4. If a wake lock is still acquired but the hard timeout expires then the system is re-suspended immediately. 5. If the system transitions to a full resume all dark resume related state and timers are cleared. BUG=chromium:898297 TEST=Unit tests and end to end test with Android applications. Change-Id: I6dbae0c5f63af67637032b62d0c56cae27d08bad Reviewed-on: https://chromium-review.googlesource.com/c/1297474 Commit-Queue: Abhishek Bhardwaj <abhishekbh@chromium.org> Reviewed-by: Yusuke Sato <yusukes@chromium.org> Cr-Commit-Position: refs/heads/master@{#602980}
- Loading branch information
Abhishek Bhardwaj
authored and
Commit Bot
committed
Oct 26, 2018
1 parent
45ec05e
commit a0b9be9
Showing
5 changed files
with
379 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.