We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ca50b44 + be95d77 commit c1a1ccaCopy full SHA for c1a1cca
policy/src/com/android/internal/policy/impl/KeyguardStatusViewManager.java
@@ -635,11 +635,13 @@ public void onClick(View v) {
635
* @return
636
*/
637
private static CharSequence makeCarierString(CharSequence plmn, CharSequence spn) {
638
- if (plmn != null && spn == null) {
639
- return plmn;
640
- } else if (plmn != null && spn != null) {
+ final boolean plmnValid = !TextUtils.isEmpty(plmn);
+ final boolean spnValid = !TextUtils.isEmpty(spn);
+ if (plmnValid && spnValid) {
641
return plmn + "|" + spn;
642
- } else if (plmn == null && spn != null) {
+ } else if (plmnValid) {
643
+ return plmn;
644
+ } else if (spnValid) {
645
return spn;
646
} else {
647
return "";
0 commit comments