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

Commit 2495adfb authored by Ladios Jonquil's avatar Ladios Jonquil
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
parent a9e322ec
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1083,12 +1083,12 @@ class LockScreen extends LinearLayout implements KeyguardScreen, KeyguardUpdateM
    }

    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 "";
        }