shill: cellular: call SetPowerState after disabling modem.
Since ModemManager no longer powers down the modem when the modem is
disabled, CellularCapabilityUniversal now calls the new SetPowerState
method on org.freedesktop.ModemManager1.Modem to put the modem into a
low power state after disabling it.
In the event that the call to SetPowerState fails, the error is ignored
and the overall disable operation is treated as success.
BUG=chromium-os:38864
TEST=1. Build and run unit tests.
2. Enable and disable cellular through the UI. On a modem that
supports the explicit switch to a low-power state,
ModemManager's PowerState property should be set to low after a
successful disable.
Change-Id: I631d8df118ed6e300ec0b197ec87e744bd2502bd
Reviewed-on: https://gerrit.chromium.org/gerrit/43241
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
diff --git a/mm1_modem_proxy_interface.h b/mm1_modem_proxy_interface.h
index 5d4b71c..b21a3f1 100644
--- a/mm1_modem_proxy_interface.h
+++ b/mm1_modem_proxy_interface.h
@@ -63,6 +63,10 @@
Error *error,
const StringCallback &callback,
int timeout) = 0;
+ virtual void SetPowerState(const uint32_t &power_state,
+ Error *error,
+ const ResultCallback &callback,
+ int timeout) = 0;
virtual void set_state_changed_callback(
@@ -93,6 +97,7 @@
virtual uint32_t PreferredMode() = 0;
virtual const std::vector< uint32_t > SupportedBands() = 0;
virtual const std::vector< uint32_t > Bands() = 0;
+ virtual uint32_t PowerState() = 0;
};
} // namespace mm1