commit | 2f352e606bbe6074eeca93eb457837e501420be7 | [log] [tgz] |
---|---|---|
author | Arman Uguray <armansito@chromium.org> | Wed Aug 28 19:12:53 2013 -0700 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Thu Sep 05 07:21:04 2013 +0000 |
tree | 3952f2f1c92a0e0a95cf1d4cc39fa4c4cc43b57c | |
parent | 416a981e9ecd20367173cf44e80969ba5bb6b054 [diff] |
shill: Enable/Disable should return error if opposite operation pending. Device::SetEnabledPersistent will now return an error, if the device is already in the requested state but there is a pending operation trying to achieve the opposite. This is to work around a problem where the user might try to enable a technology immediately after disabling it but before the disable ends. Since shill doesn't return an error in this case, the UI doesn't get informed that the enable request it recently issued won't succeed and incorrectly assumes that the device is still enabling, which in turn prevents the user from ever enabling that technology without restarting the UI. BUG=chromium:280902 TEST=Build and run unit tests. Through the status tray UI: 1. Disable cellular, and then quickly enable. 2. The toggle should soon update to show that cellular is disabled. Change-Id: I405a10e5ca366415e805f6c909da30c5d856b4b7 Reviewed-on: https://chromium-review.googlesource.com/167417 Reviewed-by: Arman Uguray <armansito@chromium.org> Tested-by: Arman Uguray <armansito@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org> Commit-Queue: Arman Uguray <armansito@chromium.org>