commit | 6eb4f2ccd75db01286b5f7b028b73b53b0f48e0a | [log] [tgz] |
---|---|---|
author | mukesh agrawal <quiche@chromium.org> | Tue Jul 01 14:31:10 2014 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Fri Jul 04 06:17:30 2014 +0000 |
tree | 38e4eb7f288de98576d4b99318fc73b8425fd1ba | |
parent | 48a7379600e53005463a6fdaa4e186a1d5a03f92 [diff] |
shill: always register for SuspendDone events In CL:195690, we updated shill to work with the new API for org.chromium.PowerManager. Unfortunately, that change had the side-effect that Manager would only receive SuspendDone (aka Resume) events if some object in shill had set a termination action. The consequence of this is that, unless a device had a cellular modem, Manager wouldn't ask PowerManager for SuspendDone events. That means that WiFi (in particular) wouldn't know when the system resumed. Without knowing that the system had resumed, WiFi would not restart or LinkMonitor (if connected), or start scanning immediately (if disconnected). This meant that users could experience longer delays before getting back online after suspend/resume. Fix this by always registering for SuspendDone events, regardless of whether or not there are registered termination actions. Note: the lack of resume events could also have led to Chromebooks retaining leases longer than they should have. (The clock used to trigger DHCP renewals doesn't advance during suspend. To accomodate this, we renew DHCP on every resume event. But without the SuspendDone event, this code wouldn't be triggered.) BUG=chromium:390294 TEST=unit tests, manual Manual test ----------- - configure DUT to connect to GoogleGuest - install modified shill on DUT - restart shill on DUT - echo > /var/log/net.log - suspend DUT - resume DUT - egrep 'wifi.+OnAfterResume' /var/log/net.log -> there should be a matching line Change-Id: I927d34bb6615c72d672cf63880c3946c8e8696b5 Reviewed-on: https://chromium-review.googlesource.com/206596 Reviewed-by: mukesh agrawal <quiche@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org> Commit-Queue: Ben Chan <benchan@chromium.org> Tested-by: Ben Chan <benchan@chromium.org>