summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2014-12-19 14:55:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-12-19 14:55:49 +0000
commit28fbe04052b95ada3c32d805f26d6d9ad5548d6b (patch)
tree93b00165d6da6c6b219315fdd14de7056aa339fb /packages/SystemUI
parent69fd01d3e6e8e94eafdb6d424f92a32ada93096d (diff)
parentc9f0571302a59b171ff16fa049e9727503ca2986 (diff)
downloadframeworks_base-28fbe04052b95ada3c32d805f26d6d9ad5548d6b.zip
frameworks_base-28fbe04052b95ada3c32d805f26d6d9ad5548d6b.tar.gz
frameworks_base-28fbe04052b95ada3c32d805f26d6d9ad5548d6b.tar.bz2
Merge "Fix missing subscription list changes" into lmp-mr1-dev
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java12
1 files changed, 7 insertions, 5 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 81c6da5..5eebf3c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -426,6 +426,9 @@ public class NetworkControllerImpl extends BroadcastReceiver
return;
}
List<SubscriptionInfo> subscriptions = mSubscriptionManager.getActiveSubscriptionInfoList();
+ if (subscriptions == null) {
+ subscriptions = Collections.emptyList();
+ }
// If there have been no relevant changes to any of the subscriptions, we can leave as is.
if (hasCorrectMobileControllers(subscriptions)) {
// Even if the controllers are correct, make sure we have the right no sims state.
@@ -500,10 +503,8 @@ public class NetworkControllerImpl extends BroadcastReceiver
}
private boolean hasCorrectMobileControllers(List<SubscriptionInfo> allSubscriptions) {
- if (allSubscriptions == null) {
- // If null then the system doesn't know the subscriptions yet, instead just wait
- // to update the MobileControllers until it knows the state.
- return true;
+ if (allSubscriptions.size() != mMobileSignalControllers.size()) {
+ return false;
}
for (SubscriptionInfo info : allSubscriptions) {
if (!mMobileSignalControllers.containsKey(info.getSubscriptionId())) {
@@ -812,7 +813,8 @@ public class NetworkControllerImpl extends BroadcastReceiver
private final OnSubscriptionsChangedListener mSubscriptionListener =
new OnSubscriptionsChangedListener() {
- public void onSubscriptionInfoChanged() {
+ @Override
+ public void onSubscriptionsChanged() {
updateMobileControllers();
};
};