Merge "Fix 5487180: Check for empty plmn/spn strings instead of just null" into ics-mr1
This commit is contained in:
@@ -635,11 +635,13 @@ class KeyguardStatusViewManager implements OnClickListener {
|
||||
* @return
|
||||
*/
|
||||
private static CharSequence makeCarierString(CharSequence plmn, CharSequence spn) {
|
||||
if (plmn != null && spn == null) {
|
||||
return plmn;
|
||||
} else if (plmn != null && spn != null) {
|
||||
final boolean plmnValid = !TextUtils.isEmpty(plmn);
|
||||
final boolean spnValid = !TextUtils.isEmpty(spn);
|
||||
if (plmnValid && spnValid) {
|
||||
return plmn + "|" + spn;
|
||||
} else if (plmn == null && spn != null) {
|
||||
} else if (plmnValid) {
|
||||
return plmn;
|
||||
} else if (spnValid) {
|
||||
return spn;
|
||||
} else {
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user