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

Commit 620c8855 authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Merge commit 'b21b57c0' into manualmerge

Conflicts:
	src/java/com/android/internal/telephony/uicc/SIMRecords.java

Change-Id: Ic998e70207851e7e00f56d6e8591e53834987358
parents a0f3a809 b21b57c0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ public interface IccConstants {
    // GSM SIM file ids from TS 51.011
    static final int EF_ADN = 0x6F3A;
    static final int EF_FDN = 0x6F3B;
    static final int EF_GID1 = 0x6F3E;
    static final int EF_SDN = 0x6F49;
    static final int EF_EXT1 = 0x6F4A;
    static final int EF_EXT2 = 0x6F4B;
+10 −0
Original line number Diff line number Diff line
@@ -72,6 +72,8 @@ public abstract class IccRecords extends Handler implements IccConstants {

    protected String mSpn;

    protected String mGid1;

    // ***** Constants

    // Markers for mncLength
@@ -245,6 +247,14 @@ public abstract class IccRecords extends Handler implements IccConstants {
        return mMsisdn;
    }

    /**
     * Get the Group Identifier Level 1 (GID1) on a SIM for GSM.
     * @return null if SIM is not yet ready
     */
    public String getGid1() {
        return null;
    }

    /**
     * Set subscriber number to SIM record
     *
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ public final class SIMFileHandler extends IccFileHandler implements IccConstants
        case EF_SPDI:
        case EF_SST:
        case EF_CFIS:
        case EF_GID1:
            return MF_SIM + DF_GSM;

        case EF_MAILBOX_CPHS:
+27 −0
Original line number Diff line number Diff line
@@ -152,6 +152,7 @@ public class SIMRecords extends IccRecords {
    private static final int EVENT_SIM_REFRESH = 31;
    private static final int EVENT_GET_CFIS_DONE = 32;
    private static final int EVENT_GET_CSP_CPHS_DONE = 33;
    private static final int EVENT_GET_GID1_DONE = 34;

    // Lookup table for carriers known to produce SIMs which incorrectly indicate MNC length.

@@ -227,6 +228,7 @@ public class SIMRecords extends IccRecords {
        mEfCPHS_MWI = null;
        mSpdiNetworks = null;
        mPnnHomeName = null;
        mGid1 = null;

        mAdnCache.reset();

@@ -257,6 +259,11 @@ public class SIMRecords extends IccRecords {
        return mMsisdn;
    }

    @Override
    public String getGid1() {
        return mGid1;
    }

    @Override
    public UsimServiceTable getUsimServiceTable() {
        return mUsimServiceTable;
@@ -1121,6 +1128,22 @@ public class SIMRecords extends IccRecords {
                handleEfCspData(data);
                break;

            case EVENT_GET_GID1_DONE:
                isRecordLoadResponse = true;

                ar = (AsyncResult)msg.obj;
                data =(byte[])ar.result;

                if (ar.exception != null) {
                    loge("Exception in get GID1 " + ar.exception);
                    mGid1 = null;
                    break;
                }
                mGid1 = IccUtils.bytesToHexString(data);
                log("GID1: " + mGid1);

                break;

            default:
                super.handleMessage(msg);   // IccRecords handles generic record load responses

@@ -1395,6 +1418,9 @@ public class SIMRecords extends IccRecords {
        mFh.loadEFTransparent(EF_CSP_CPHS,obtainMessage(EVENT_GET_CSP_CPHS_DONE));
        mRecordsToLoad++;

        mFh.loadEFTransparent(EF_GID1, obtainMessage(EVENT_GET_GID1_DONE));
        mRecordsToLoad++;

        // XXX should seek instead of examining them all
        if (false) { // XXX
            mFh.loadEFLinearFixedAll(EF_SMS, obtainMessage(EVENT_GET_ALL_SMS_DONE));
@@ -1717,6 +1743,7 @@ public class SIMRecords extends IccRecords {
        pw.println(" mSpdiNetworks[]=" + mSpdiNetworks);
        pw.println(" mPnnHomeName=" + mPnnHomeName);
        pw.println(" mUsimServiceTable=" + mUsimServiceTable);
        pw.println(" mGid1=" + mGid1);
        pw.flush();
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ public final class UsimFileHandler extends IccFileHandler implements IccConstant
        case EF_EXT2:
        case EF_INFO_CPHS:
        case EF_CSP_CPHS:
        case EF_GID1:
            return MF_SIM + DF_ADF;

        case EF_PBR: