From 93fb68fdce8f0d28eaa77704e4b00933260b83dd Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Mon, 20 Jul 2015 11:43:56 -0400 Subject: Fix network name not showing in QS sometimes Only set the network name from service state if we are sure we a value for it. Bug: 22212693 Change-Id: I0811e8fe4682180d9187c42362bc40ab19922f2c --- .../com/android/systemui/statusbar/policy/MobileSignalController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java index 82224d4..13e9b16 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java @@ -25,6 +25,7 @@ import android.telephony.SignalStrength; import android.telephony.SubscriptionInfo; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; +import android.text.TextUtils; import android.util.Log; import android.util.SparseArray; @@ -389,7 +390,7 @@ public class MobileSignalController extends SignalController< } // Fill in the network name if we think we have it. if (mCurrentState.networkName == mNetworkNameDefault && mServiceState != null - && mServiceState.getOperatorAlphaShort() != null) { + && !TextUtils.isEmpty(mServiceState.getOperatorAlphaShort())) { mCurrentState.networkName = mServiceState.getOperatorAlphaShort(); } -- cgit v1.1