summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAnju Mathapati <anjucm@codeaurora.org>2012-11-06 07:50:39 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2012-11-06 14:43:50 -0800
commit2bc7f2e1da139e183519af01f50940327ca9765e (patch)
tree67ac459afa6ab0e17147e5f3edca46c675888c71 /src
parent44be3fc486c049bbfea331b0fc2cff0552326f4b (diff)
downloadframeworks_opt_telephony-2bc7f2e1da139e183519af01f50940327ca9765e.zip
frameworks_opt_telephony-2bc7f2e1da139e183519af01f50940327ca9765e.tar.gz
frameworks_opt_telephony-2bc7f2e1da139e183519af01f50940327ca9765e.tar.bz2
Use proper check for spn for operator name display
Change null check to null or empty string check. bug:7389730 Change-Id: I593429b8668b49978ad38b28062b8b2031464813
Diffstat (limited to 'src')
-rwxr-xr-xsrc/java/com/android/internal/telephony/gsm/SIMRecords.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/java/com/android/internal/telephony/gsm/SIMRecords.java b/src/java/com/android/internal/telephony/gsm/SIMRecords.java
index 0e2ba1d..e866757 100755
--- a/src/java/com/android/internal/telephony/gsm/SIMRecords.java
+++ b/src/java/com/android/internal/telephony/gsm/SIMRecords.java
@@ -24,6 +24,7 @@ import android.os.AsyncResult;
import android.os.Handler;
import android.os.Message;
import android.os.SystemProperties;
+import android.text.TextUtils;
import android.util.Log;
import com.android.internal.telephony.AdnRecord;
@@ -1407,13 +1408,14 @@ public class SIMRecords extends IccRecords {
* specified plmn (currently-registered PLMN). See TS 22.101 Annex A
* and TS 51.011 10.3.11 for details.
*
- * If the SPN is not found on the SIM, the rule is always PLMN_ONLY.
+ * If the SPN is not found on the SIM or is empty, the rule is
+ * always PLMN_ONLY.
*/
@Override
public int getDisplayRule(String plmn) {
int rule;
- if (spn == null || spnDisplayCondition == -1) {
- // EF_SPN was not found on the SIM, or not yet loaded. Just show ONS.
+ if (TextUtils.isEmpty(spn) || spnDisplayCondition == -1) {
+ // No EF_SPN content was found on the SIM, or not yet loaded. Just show ONS.
rule = SPN_RULE_SHOW_PLMN;
} else if (isOnMatchingPlmn(plmn)) {
rule = SPN_RULE_SHOW_SPN;