shill: Reregister suspend delays when powerd is restarted.
This CL updates PowerManager to track the powerd DBus NameOwneChanged
notifications. When it notices powerd has been restarted, it attempts to
reregister to suspend delays added to it. The behaviour of PowerManager for
client objects remains unchanged.
BUG=chromium:366122
TEST=(1) Run shill_unittests.
(2) Manually verify on a device with cellular support:
- start shill; start powerd
- restart powerd
Verify from shill logs that power_manager.cc reregisters suspend
delays.
- suspend_stress_test -c 1
Verify from shill logs that |TerminationActions| are run.
CQ-DEPEND=CL:196838
Change-Id: Ic529a26f416768f8fb6ac9612ac3452951ee109f
Reviewed-on: https://chromium-review.googlesource.com/196701
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
5 files changed