summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2014-12-09 12:27:24 -0500
committerJason Monk <jmonk@google.com>2014-12-09 12:51:35 -0500
commit25d8a48e7348c939a3f829fe87e47857307bdbf9 (patch)
treea3a2d654dc7b19994651f45bf2957132c5b1b150 /packages/SystemUI/src/com/android/systemui
parentc5c93edd9354e956d9b0a4d85fc8372907e2b011 (diff)
downloadframeworks_base-25d8a48e7348c939a3f829fe87e47857307bdbf9.zip
frameworks_base-25d8a48e7348c939a3f829fe87e47857307bdbf9.tar.gz
frameworks_base-25d8a48e7348c939a3f829fe87e47857307bdbf9.tar.bz2
Push inet condition to new MobileSignalControllers
When new MobileSignalControllers were created after we already received the inet condition broadcast, they would never receive the current state of inet condition. This pushes it to all controllers whenever they are created. Bug: 18666876 Change-Id: Ie9997f94f3fbe206ed222a62e2a902fd43f4d67c
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 6431ab5..070af78 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -483,6 +483,10 @@ public class NetworkControllerImpl extends BroadcastReceiver
cachedControllers.get(key).unregisterListener();
}
}
+ // There may be new MobileSignalControllers around, make sure they get the current
+ // inet condition and airplane mode.
+ pushConnectivityToSignals();
+ updateAirplaneMode(true /* force */);
}
private boolean hasCorrectMobileControllers(List<SubscriptionInfo> allSubscriptions) {
@@ -577,6 +581,13 @@ public class NetworkControllerImpl extends BroadcastReceiver
mBluetoothTethered = mConnectedTransports.get(TRANSPORT_BLUETOOTH);
mEthernetConnected = mConnectedTransports.get(TRANSPORT_ETHERNET);
+ pushConnectivityToSignals();
+ }
+
+ /**
+ * Pushes the current connectivity state to all SignalControllers.
+ */
+ private void pushConnectivityToSignals() {
// We want to update all the icons, all at once, for any condition change
for (MobileSignalController mobileSignalController : mMobileSignalControllers.values()) {
mobileSignalController.setInetCondition(