shill: Add CellularCapabilityUniversal
Add the CellularCapabilityUniversal class so that shill can talk to a
ModemManager1 DBUS interface. Ensure that a modems can be created
with either the new or the old modem manager running.
Register to receive DBus property changes from ModemManager1
BUG=chromium-os:28596, chromium-os:26650
TEST=Run unit tests, test that modem is created with Y3300
Change-Id: I8717318e944589bc85e763bd7234336559256dbc
Reviewed-on: https://gerrit.chromium.org/gerrit/19888
Commit-Ready: Jason Glasgow <jglasgow@chromium.org>
Reviewed-by: Jason Glasgow <jglasgow@chromium.org>
Tested-by: Jason Glasgow <jglasgow@chromium.org>
diff --git a/mm1_modem_proxy.cc b/mm1_modem_proxy.cc
index def4fe1..4ba6541 100644
--- a/mm1_modem_proxy.cc
+++ b/mm1_modem_proxy.cc
@@ -243,7 +243,8 @@
void ModemProxy::Proxy::StateChanged(const int32_t &old,
const int32_t &_new,
const uint32_t &reason) {
- state_changed_callback_.Run(old, _new, reason);
+ if (!state_changed_callback_.is_null())
+ state_changed_callback_.Run(old, _new, reason);
}
// Method callbacks inherited from