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}
Showing
This diff is collapsed.
Please register or sign in to comment