diff options
author | Daniel Sandler <dsandler@android.com> | 2012-07-25 12:31:22 -0400 |
---|---|---|
committer | Daniel Sandler <dsandler@android.com> | 2012-07-25 12:33:50 -0400 |
commit | 9af376e57ad83d43cd1d326c295ea90b225f2983 (patch) | |
tree | e3c62837b921056ad6c4887d1d7fddbe8c417225 /packages | |
parent | 3ee47ae7ee0d0afc0a2bbe71636c31483b5502cd (diff) | |
download | frameworks_base-9af376e57ad83d43cd1d326c295ea90b225f2983.zip frameworks_base-9af376e57ad83d43cd1d326c295ea90b225f2983.tar.gz frameworks_base-9af376e57ad83d43cd1d326c295ea90b225f2983.tar.bz2 |
Fix NPE on some phones at startup.
Bug: 6877589
Change-Id: I65ff37b4cf6b59a72a7aa665f252f5fb34f3b183
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 { |