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

Commit dc391209 authored by Orlowski, Rafal (EXT)'s avatar Orlowski, Rafal (EXT) Committed by takeshi tanigawa
Browse files

Disable showSpn under no service condition

"No Service" with SPN text is displayed on lock screen under no service
condition. But most of the operators require not to display SPN text on
that condition since showing "No Service + SPN" confuses user. By
disabling showSpn, SPN text is not displayed on lock screen.

Test: Verified by manual
Bug: 31952303
Change-Id: Ieea7172271ab0f8c179b6963201faee7c2c7882d
parent 06bf7483
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2143,6 +2143,7 @@ public class ServiceStateTracker extends Handler {
            String plmn = null;
            boolean showPlmn = false;
            int rule = (iccRecords != null) ? iccRecords.getDisplayRule(mSS) : 0;
            boolean noService = false;
            if (combinedRegState == ServiceState.STATE_OUT_OF_SERVICE
                    || combinedRegState == ServiceState.STATE_EMERGENCY_ONLY) {
                showPlmn = true;
@@ -2159,6 +2160,7 @@ public class ServiceStateTracker extends Handler {
                    // No service at all
                    plmn = Resources.getSystem().
                            getText(com.android.internal.R.string.lockscreen_carrier_default).toString();
                    noService = true;
                }
                if (DBG) log("updateSpnDisplay: radio is on but out " +
                        "of service, set plmn='" + plmn + "'");
@@ -2183,7 +2185,7 @@ public class ServiceStateTracker extends Handler {
            //    EXTRA_DATA_SPN = dataSpn
            String spn = (iccRecords != null) ? iccRecords.getServiceProviderName() : "";
            String dataSpn = spn;
            boolean showSpn = !TextUtils.isEmpty(spn)
            boolean showSpn = !noService && !TextUtils.isEmpty(spn)
                    && ((rule & SIMRecords.SPN_RULE_SHOW_SPN)
                    == SIMRecords.SPN_RULE_SHOW_SPN);