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

Commit 67ffc1d8 authored by Erica Chang's avatar Erica Chang
Browse files

frameworks: telephony: SPN display should check cdma.home sys prop

Change-Id: I67c760668b1bea137c6d81e5219958e884e0a4ee
(cherry picked from commit c4d59b8a)
parent 6fd82d80
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ import com.android.internal.telephony.uicc.UiccCardApplication;
import com.android.internal.telephony.uicc.UiccController;
import com.android.internal.telephony.HbpcdUtils;
import com.android.internal.telephony.uicc.RuimRecords;
import com.android.internal.telephony.Operators;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -603,8 +604,13 @@ public class CdmaServiceStateTracker extends ServiceStateTracker {
            if (DBG) log("updateSpnDisplay: radio is on but out " +
                    "of service, set plmn='" + plmn + "'");
        } else if (combinedRegState == ServiceState.STATE_IN_SERVICE) {
            if (SystemProperties.getBoolean("ro.cdma.force_plmn_lookup", false)) {
                plmn = Operators.operatorReplace(mSS.getOperatorNumeric());
            } else {
                plmn = TextUtils.isEmpty(mSS.getOperatorAlphaLong()) ? SystemProperties.get(
                            "ro.cdma.home.operator.alpha", "") : mSS.getOperatorAlphaLong();
            }
            // depends on the rule and whether plmn or spn is null
            plmn = mSS.getOperatorAlphaLong();
            showPlmn = ( !TextUtils.isEmpty(plmn)) &&
                    ((rule & RuimRecords.SPN_RULE_SHOW_PLMN) == RuimRecords.SPN_RULE_SHOW_PLMN);
            spn = (mIccRecords != null) ? mIccRecords.getServiceProviderName() : "";