commit | 16d3acb22c5c94eedebded92dc83f2a43b81cc6f | [log] [tgz] |
---|---|---|
author | Ben Chan <benchan@chromium.org> | Tue May 13 22:08:14 2014 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Wed May 14 22:53:20 2014 +0000 |
tree | 0a97c1dceaf3632f776b922fa9f097199a8cb90a | |
parent | dc1819d8d761028caa002a7c1d68eb96116e78b2 [diff] |
shill: Keep registered suspend delay after termination action completes shill previously registered a suspend delay with power manager only when there was a termination action to perform before suspend. Upon the completion of the termination action, shill unregistered the suspend delay before reporting the suspend readiness to power manager. However, without the suspend delay, the corresponding SuspendDone callback wouldn't be invoked after the completion of the suspend attempt. If a cellular device was disabled by the termination action, it wouldn't be re-enabled by the SuspendDone callback. This CL addresses the issue by keeping the registered suspend delay after the termination action completes and only unregisters the suspend delay when the power manager is destructed. BUG=chromium:371585 TEST=Tested the following: 1. Build and run unit tests. 2. Test on a daisy_spring device with an ALT3100 modem: a. Connect the modem to a cellular network. Make sure the cellular service is set to auto-connect. b. Run `powerd_dbus_suspend` under a root shell to suspend the device. c. Press a key to wake up the device. d. Verify that shill re-enables the modem and reconnects it to the network. e. Restart powerd and verify that shill reregisters the suspend delay. f. Repeat (a) to (d). Change-Id: I6651523f77bbfd918f40a6cc7a3702a4f3e6d2ee Reviewed-on: https://chromium-review.googlesource.com/199810 Reviewed-by: Daniel Erat <derat@chromium.org> Commit-Queue: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org>