diff options
author | Daniel Sandler <dsandler@android.com> | 2012-07-25 11:32:38 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-07-25 11:32:38 -0700 |
commit | c524ca275add1c84ef4e1e5c105058f44cac5efb (patch) | |
tree | cfc492fe028776d91fb0cc75aa382eb948a07574 /packages | |
parent | a45746efadd11bb7dfab026fb3c81a25fae74ca4 (diff) | |
parent | 9af376e57ad83d43cd1d326c295ea90b225f2983 (diff) | |
download | frameworks_base-c524ca275add1c84ef4e1e5c105058f44cac5efb.zip frameworks_base-c524ca275add1c84ef4e1e5c105058f44cac5efb.tar.gz frameworks_base-c524ca275add1c84ef4e1e5c105058f44cac5efb.tar.bz2 |
Merge "Fix NPE on some phones at startup." into jb-dev
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java index 230114a..e3f2ca4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java @@ -917,6 +917,7 @@ public class NetworkController extends BroadcastReceiver { String wifiLabel = ""; String mobileLabel = ""; int N; + final boolean emergencyOnly = (mServiceState != null && mServiceState.isEmergencyOnly()); if (!mHasMobileDataFeature) { mDataSignalIconId = mPhoneSignalIconId = 0; @@ -932,8 +933,8 @@ public class NetworkController extends BroadcastReceiver { if (mDataConnected) { mobileLabel = mNetworkName; - } else if (mConnected || mServiceState.isEmergencyOnly()) { - if (hasService() || mServiceState.isEmergencyOnly()) { + } else if (mConnected || emergencyOnly) { + if (hasService() || emergencyOnly) { // The isEmergencyOnly test covers the case of a phone with no SIM mobileLabel = mNetworkName; } else { |