shill: Disconnect and disable cellular modem when stopping the device.
Also, disconnect the cellular service on Service::Disconnect. A separate patch
wires this up to powering off the device (crosbug.com/25014).
BUG=chromium-os:25116,chromium-os:25013
TEST=unit tests, tested on chromebook with disconnect-service
Change-Id: Id3b8c10fbfd917702738b8a4385d7954c03de204
Reviewed-on: https://gerrit.chromium.org/gerrit/14230
Commit-Ready: Darin Petkov <petkov@chromium.org>
Reviewed-by: Darin Petkov <petkov@chromium.org>
Tested-by: Darin Petkov <petkov@chromium.org>
diff --git a/cellular_service.cc b/cellular_service.cc
index 43aa917..11c3db8 100644
--- a/cellular_service.cc
+++ b/cellular_service.cc
@@ -52,6 +52,11 @@
cellular_->Connect(error);
}
+void CellularService::Disconnect(Error *error) {
+ Service::Disconnect(error);
+ cellular_->Disconnect(error);
+}
+
void CellularService::ActivateCellularModem(const string &carrier,
Error *error) {
cellular_->Activate(carrier, error);