Fix 6804479: "Emergency calls only" in notification shade
Add an additional codepath to the "no connectivity" logic in
NetworkController to allow the PLMN bubble up from the
GsmServiceStateTracker, where R.string.emergency_calls_only
is returned if we're in emergency call mode.
Bug: 6804479
Change-Id: I0a77261e4393cc0dc32bae3e631ef196b2342f06
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 1068267..230114a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -932,10 +932,12 @@
if (mDataConnected) {
mobileLabel = mNetworkName;
- } else if (mConnected) {
- if (hasService()) {
+ } else if (mConnected || mServiceState.isEmergencyOnly()) {
+ if (hasService() || mServiceState.isEmergencyOnly()) {
+ // The isEmergencyOnly test covers the case of a phone with no SIM
mobileLabel = mNetworkName;
} else {
+ // Tablets, basically
mobileLabel = "";
}
} else {