From 0ae29275b863b865c7734f14a4427906134b95b1 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Tue, 24 Jul 2012 15:19:04 -0400 Subject: [PATCH] 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 --- .../systemui/statusbar/policy/NetworkController.java | 6 ++++-- 1 file changed, 4 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 1068267013482..230114ad341a6 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 @@ public class NetworkController extends BroadcastReceiver { 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 {