shill: Broadcast serving cellular operator property changes.
BUG=chromium-os:25011
TEST=unit tests
Change-Id: I52867ef2a95b8babd418ff64d33435c0b54b6ab8
Reviewed-on: https://gerrit.chromium.org/gerrit/14987
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/cellular_service.cc b/cellular_service.cc
index 68b2544..e7eaf6d 100644
--- a/cellular_service.cc
+++ b/cellular_service.cc
@@ -109,8 +109,13 @@
return serving_operator_;
}
-void CellularService::set_serving_operator(const Cellular::Operator &oper) {
+void CellularService::SetServingOperator(const Cellular::Operator &oper) {
+ if (serving_operator_.Equals(oper)) {
+ return;
+ }
serving_operator_.CopyFrom(oper);
+ adaptor()->EmitStringmapChanged(flimflam::kServingOperatorProperty,
+ oper.ToDict());
}
} // namespace shill