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

Commit c04a910b authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android Partner Code Review
Browse files

Merge "Use EF_EXT5 as extension for EF_MSISDN on USIM" into m-wireless-dev

parents 164ca5a3 b66ae5f6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ public interface IccConstants {
    static final int EF_EXT1 = 0x6F4A;
    static final int EF_EXT2 = 0x6F4B;
    static final int EF_EXT3 = 0x6F4C;
    static final int EF_EXT5 = 0x6F4E;
    static final int EF_EXT6 = 0x6fc8;   // Ext record for EF[MBDN]
    static final int EF_MWIS = 0x6FCA;
    static final int EF_MBDN = 0x6fc7;
+19 −3
Original line number Diff line number Diff line
@@ -283,6 +283,23 @@ public class SIMRecords extends IccRecords {
        return mUsimServiceTable;
    }

    private int getExtFromEf(int ef) {
        int ext;
        switch (ef) {
            case EF_MSISDN:
                /* For USIM apps use EXT5. (TS 31.102 Section 4.2.37) */
                if (mParentApp.getType() == AppType.APPTYPE_USIM) {
                    ext = EF_EXT5;
                } else {
                    ext = EF_EXT1;
                }
                break;
            default:
                ext = EF_EXT1;
        }
        return ext;
    }

    /**
     * Set subscriber number to SIM record
     *
@@ -309,10 +326,9 @@ public class SIMRecords extends IccRecords {

        if(DBG) log("Set MSISDN: " + mNewMsisdnTag + " " + /*mNewMsisdn*/ "xxxxxxx");


        AdnRecord adn = new AdnRecord(mNewMsisdnTag, mNewMsisdn);

        new AdnRecordLoader(mFh).updateEF(adn, EF_MSISDN, EF_EXT1, 1, null,
        new AdnRecordLoader(mFh).updateEF(adn, EF_MSISDN, getExtFromEf(EF_MSISDN), 1, null,
                obtainMessage(EVENT_SET_MSISDN_DONE, onComplete));
    }

@@ -1533,7 +1549,7 @@ public class SIMRecords extends IccRecords {

        // FIXME should examine EF[MSISDN]'s capability configuration
        // to determine which is the voice/data/fax line
        new AdnRecordLoader(mFh).loadFromEF(EF_MSISDN, EF_EXT1, 1,
        new AdnRecordLoader(mFh).loadFromEF(EF_MSISDN, getExtFromEf(EF_MSISDN), 1,
                    obtainMessage(EVENT_GET_MSISDN_DONE));
        mRecordsToLoad++;

+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ public final class UsimFileHandler extends IccFileHandler implements IccConstant
    protected String getEFPath(int efid) {
        switch(efid) {
        case EF_SMS:
        case EF_EXT5:
        case EF_EXT6:
        case EF_MWIS:
        case EF_MBI: