diff options
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 { |