Permalink
Browse files

lockscreen: Don't show '|' in carrier label if plmn/spn is empty

Don't show separator '|' in carrier label on lockscreen if both
plmn and spn are not null, and one of them is an empty string.

Change-Id: Ibccb20d45989c8a1a220679cef7aea474be0237a
  • Loading branch information...
1 parent a9e322e commit 2495adfb680f968afcb7c69bbbb427f3eed62c85 @ladios ladios committed May 27, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 policy/src/com/android/internal/policy/impl/LockScreen.java
@@ -1083,12 +1083,12 @@ private void updateLayout(Status status) {
}
static CharSequence getCarrierString(CharSequence telephonyPlmn, CharSequence telephonySpn) {
- if (telephonyPlmn != null && telephonySpn == null) {
+ if (telephonyPlmn != null && (telephonySpn == null || "".contentEquals(telephonySpn))) {
return telephonyPlmn;
+ } else if (telephonySpn != null && (telephonyPlmn == null || "".contentEquals(telephonyPlmn))) {
+ return telephonySpn;
} else if (telephonyPlmn != null && telephonySpn != null) {
return telephonyPlmn + "|" + telephonySpn;
- } else if (telephonyPlmn == null && telephonySpn != null) {
- return telephonySpn;
} else {
return "";
}

0 comments on commit 2495adf

Please sign in to comment.