Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be95d778 authored by Jim Miller's avatar Jim Miller
Browse files

Fix 5487180: Check for empty plmn/spn strings instead of just null

This fixes a problem where we'd sometimes show a '|' in front of
the spn string or after the plmn string.

Change-Id: I6a3a398b0ddf89fcc8862b275dea0e925873b56a
parent 2333a02e
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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 "";