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

Commit f9d2bb6e authored by duho.ro's avatar duho.ro Committed by Ethan Chen
Browse files

UICC: get ICCID from SIM for CDMAPhone state

If the phone state is CDMAPhone and the UICC does not have a CDMA application,
getIccSerialNumber() can not read the ICCID from SIM.
This changes are changing the reference of the card application object
from RUIMRecords to SIMRecords. So, this method is able to get the ICCID
from SIMRecords, if the UICC has a SIM/USIM.

Bug: 10564873
Change-Id: Id55f794828f1f1a89905298776500df90088b17e
parent 9ed9db55
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -448,6 +448,16 @@ public class CDMAPhone extends PhoneBase {
        mCT.switchWaitingOrHoldingAndActive();
        mCT.switchWaitingOrHoldingAndActive();
    }
    }


    @Override
    public String getIccSerialNumber() {
        IccRecords r = mIccRecords.get();
        if (r == null) {
            // to get ICCID form SIMRecords because it is on MF.
            r = mUiccController.getIccRecords(UiccController.APP_FAM_3GPP);
        }
        return (r != null) ? r.getIccId() : null;
    }

    @Override
    @Override
    public String getLine1Number() {
    public String getLine1Number() {
        return mSST.getMdnNumber();
        return mSST.getMdnNumber();