Implement dark resume re-suspend and exit logic |
||
Issue descriptionWhen the system wakes up in dark resume, implement logic to- 1. Re-suspend based on wake lock acquisition by Android. 2. Exit and do a full resume if a notification is drawn by Android.
,
Oct 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a0b9be912bc2e71563d3588075d5266be11cd95a commit a0b9be912bc2e71563d3588075d5266be11cd95a Author: Abhishek Bhardwaj <abhishekbh@chromium.org> Date: Fri Oct 26 03:27:31 2018 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} [modify] https://crrev.com/a0b9be912bc2e71563d3588075d5266be11cd95a/components/arc/BUILD.gn [modify] https://crrev.com/a0b9be912bc2e71563d3588075d5266be11cd95a/components/arc/wake_lock/arc_wake_lock_bridge.cc [modify] https://crrev.com/a0b9be912bc2e71563d3588075d5266be11cd95a/components/arc/wake_lock/arc_wake_lock_bridge.h [modify] https://crrev.com/a0b9be912bc2e71563d3588075d5266be11cd95a/components/arc/wake_lock/arc_wake_lock_bridge_unittest.cc [add] https://crrev.com/a0b9be912bc2e71563d3588075d5266be11cd95a/components/arc/wake_lock/wake_lock_observer.h
,
Oct 26
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c7c5e82b4e2ebc1ef4429b772508ed4231686dd5 commit c7c5e82b4e2ebc1ef4429b772508ed4231686dd5 Author: Lei Zhang <thestig@chromium.org> Date: Fri Oct 26 05:10:22 2018 Revert "arc: Add wake lock based logic to re-suspend after dark resume" This reverts commit a0b9be912bc2e71563d3588075d5266be11cd95a. Reason for revert: Broke linux-chromeos-dbg https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/linux-chromeos-dbg/8515 Original change's description: > 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} TBR=derat@chromium.org,yusukes@chromium.org,abhishekbh@chromium.org,ravisadineni@chromium.org Change-Id: If613721a75cf2341b12310622649dfb17da1308f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:898297 Reviewed-on: https://chromium-review.googlesource.com/c/1301074 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#602992} [modify] https://crrev.com/c7c5e82b4e2ebc1ef4429b772508ed4231686dd5/components/arc/BUILD.gn [modify] https://crrev.com/c7c5e82b4e2ebc1ef4429b772508ed4231686dd5/components/arc/wake_lock/arc_wake_lock_bridge.cc [modify] https://crrev.com/c7c5e82b4e2ebc1ef4429b772508ed4231686dd5/components/arc/wake_lock/arc_wake_lock_bridge.h [modify] https://crrev.com/c7c5e82b4e2ebc1ef4429b772508ed4231686dd5/components/arc/wake_lock/arc_wake_lock_bridge_unittest.cc [delete] https://crrev.com/f8ab889cccedf7c5ba8133a2b9f267cd4a7d3a28/components/arc/wake_lock/wake_lock_observer.h
,
Oct 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/91b547aa99e67deb71837f92347163f0c76c6799 commit 91b547aa99e67deb71837f92347163f0c76c6799 Author: Abhishek Bhardwaj <abhishekbh@chromium.org> Date: Sat Oct 27 00:06:39 2018 Reland "arc: Add wake lock based logic to re-suspend after dark resume" This is a reland of https://crrev.com/c/1297474. 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. On top of this change - 1. Changes were added to fix linker errors by declaring static constants in the source file as well. 2. Refactored some functions in the test code. BUG= chromium:898297 TEST=Unit tests and end to end test with Android applications. Change-Id: I573f130fad2ed092d8acb83fb3319614b4ce8e02 Reviewed-on: https://chromium-review.googlesource.com/c/1302866 Reviewed-by: Yusuke Sato <yusukes@chromium.org> Commit-Queue: Abhishek Bhardwaj <abhishekbh@chromium.org> Cr-Commit-Position: refs/heads/master@{#603264} [modify] https://crrev.com/91b547aa99e67deb71837f92347163f0c76c6799/components/arc/BUILD.gn [modify] https://crrev.com/91b547aa99e67deb71837f92347163f0c76c6799/components/arc/wake_lock/arc_wake_lock_bridge.cc [modify] https://crrev.com/91b547aa99e67deb71837f92347163f0c76c6799/components/arc/wake_lock/arc_wake_lock_bridge.h [modify] https://crrev.com/91b547aa99e67deb71837f92347163f0c76c6799/components/arc/wake_lock/arc_wake_lock_bridge_unittest.cc [add] https://crrev.com/91b547aa99e67deb71837f92347163f0c76c6799/components/arc/wake_lock/wake_lock_observer.h
,
Nov 22
|
||
►
Sign in to add a comment |
||
Comment 1 by abhishekbh@google.com
, Oct 23