summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-07-22 12:54:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-22 12:54:20 +0000
commita910a04b8a079a01d684266875eb18c318012de4 (patch)
tree2ece6c4d1a4bdf474caf261b567678e9a0cfd479 /packages
parent091f0e5c6c7f9e72a6e661c4849a2e232823075b (diff)
parent1c040dbee62676226349b67d528b3d384c5ecfad (diff)
downloadframeworks_base-a910a04b8a079a01d684266875eb18c318012de4.zip
frameworks_base-a910a04b8a079a01d684266875eb18c318012de4.tar.gz
frameworks_base-a910a04b8a079a01d684266875eb18c318012de4.tar.bz2
Merge "Fix crash in NetworkControllerImpl" into mnc-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java15
2 files changed, 12 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 46beed7..d829299 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -2913,7 +2913,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
updateRowStates();
mIconController.updateResources();
mScreenPinningRequest.onConfigurationChanged();
- mNetworkController.handleConfigurationChanged();
+ mNetworkController.onConfigurationChanged();
}
@Override
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 81f2d53..7cd94d7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -197,7 +197,6 @@ public class NetworkControllerImpl extends BroadcastReceiver
filter.addAction(TelephonyIntents.SPN_STRINGS_UPDATED_ACTION);
filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
filter.addAction(ConnectivityManager.INET_CONDITION_ACTION);
- filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
mContext.registerReceiver(this, filter, null, mReceiverHandler);
mListening = true;
@@ -339,8 +338,6 @@ public class NetworkControllerImpl extends BroadcastReceiver
if (action.equals(ConnectivityManager.CONNECTIVITY_ACTION) ||
action.equals(ConnectivityManager.INET_CONDITION_ACTION)) {
updateConnectivity();
- } else if (action.equals(Intent.ACTION_CONFIGURATION_CHANGED)) {
- handleConfigurationChanged();
} else if (action.equals(Intent.ACTION_AIRPLANE_MODE_CHANGED)) {
refreshLocale();
updateAirplaneMode(false);
@@ -373,8 +370,18 @@ public class NetworkControllerImpl extends BroadcastReceiver
}
}
- public void handleConfigurationChanged() {
+ public void onConfigurationChanged() {
mConfig = Config.readConfig(mContext);
+ mReceiverHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ handleConfigurationChanged();
+ }
+ });
+ }
+
+ @VisibleForTesting
+ void handleConfigurationChanged() {
for (MobileSignalController mobileSignalController : mMobileSignalControllers.values()) {
mobileSignalController.setConfiguration(mConfig);
}