Search in sources :

Example 1 with IccFileHandler

use of com.android.internal.telephony.IccFileHandler in project XobotOS by xamarin.

the class CdmaLteUiccRecords method fetchSimRecords.

@Override
protected void fetchSimRecords() {
    IccFileHandler iccFh = phone.getIccFileHandler();
    recordsRequested = true;
    phone.mCM.getIMSI(obtainMessage(EVENT_GET_IMSI_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_ICCID, obtainMessage(EVENT_GET_ICCID_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_AD, obtainMessage(EVENT_GET_AD_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_PL, obtainMessage(EVENT_GET_ICC_RECORD_DONE, new EfPlLoaded()));
    recordsToLoad++;
    new AdnRecordLoader(phone).loadFromEF(EF_MSISDN, EF_EXT1, 1, obtainMessage(EVENT_GET_MSISDN_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_CSIM_LI, obtainMessage(EVENT_GET_ICC_RECORD_DONE, new EfCsimLiLoaded()));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_CSIM_SPN, obtainMessage(EVENT_GET_ICC_RECORD_DONE, new EfCsimSpnLoaded()));
    recordsToLoad++;
    iccFh.loadEFLinearFixed(EF_CSIM_MDN, 1, obtainMessage(EVENT_GET_ICC_RECORD_DONE, new EfCsimMdnLoaded()));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_CSIM_IMSIM, obtainMessage(EVENT_GET_ICC_RECORD_DONE, new EfCsimImsimLoaded()));
    recordsToLoad++;
    iccFh.loadEFLinearFixedAll(EF_CSIM_CDMAHOME, obtainMessage(EVENT_GET_ICC_RECORD_DONE, new EfCsimCdmaHomeLoaded()));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_CSIM_EPRL, obtainMessage(EVENT_GET_ICC_RECORD_DONE, new EfCsimEprlLoaded()));
    recordsToLoad++;
    // load ISIM records
    recordsToLoad += mIsimUiccRecords.fetchIsimRecords(iccFh, this);
}
Also used : AdnRecordLoader(com.android.internal.telephony.AdnRecordLoader) IccFileHandler(com.android.internal.telephony.IccFileHandler)

Example 2 with IccFileHandler

use of com.android.internal.telephony.IccFileHandler in project XobotOS by xamarin.

the class SIMRecords method fetchSimRecords.

protected void fetchSimRecords() {
    recordsRequested = true;
    IccFileHandler iccFh = phone.getIccFileHandler();
    Log.v(LOG_TAG, "SIMRecords:fetchSimRecords " + recordsToLoad);
    phone.mCM.getIMSI(obtainMessage(EVENT_GET_IMSI_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_ICCID, obtainMessage(EVENT_GET_ICCID_DONE));
    recordsToLoad++;
    // FIXME should examine EF[MSISDN]'s capability configuration
    // to determine which is the voice/data/fax line
    new AdnRecordLoader(phone).loadFromEF(EF_MSISDN, EF_EXT1, 1, obtainMessage(EVENT_GET_MSISDN_DONE));
    recordsToLoad++;
    // Record number is subscriber profile
    iccFh.loadEFLinearFixed(EF_MBI, 1, obtainMessage(EVENT_GET_MBI_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_AD, obtainMessage(EVENT_GET_AD_DONE));
    recordsToLoad++;
    // Record number is subscriber profile
    iccFh.loadEFLinearFixed(EF_MWIS, 1, obtainMessage(EVENT_GET_MWIS_DONE));
    recordsToLoad++;
    // Also load CPHS-style voice mail indicator, which stores
    // the same info as EF[MWIS]. If both exist, both are updated
    // but the EF[MWIS] data is preferred
    // Please note this must be loaded after EF[MWIS]
    iccFh.loadEFTransparent(EF_VOICE_MAIL_INDICATOR_CPHS, obtainMessage(EVENT_GET_VOICE_MAIL_INDICATOR_CPHS_DONE));
    recordsToLoad++;
    // Same goes for Call Forward Status indicator: fetch both
    // EF[CFIS] and CPHS-EF, with EF[CFIS] preferred.
    iccFh.loadEFLinearFixed(EF_CFIS, 1, obtainMessage(EVENT_GET_CFIS_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_CFF_CPHS, obtainMessage(EVENT_GET_CFF_DONE));
    recordsToLoad++;
    getSpnFsm(true, null);
    iccFh.loadEFTransparent(EF_SPDI, obtainMessage(EVENT_GET_SPDI_DONE));
    recordsToLoad++;
    iccFh.loadEFLinearFixed(EF_PNN, 1, obtainMessage(EVENT_GET_PNN_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_SST, obtainMessage(EVENT_GET_SST_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_INFO_CPHS, obtainMessage(EVENT_GET_INFO_CPHS_DONE));
    recordsToLoad++;
    iccFh.loadEFTransparent(EF_CSP_CPHS, obtainMessage(EVENT_GET_CSP_CPHS_DONE));
    recordsToLoad++;
    // XXX should seek instead of examining them all
    if (false) {
        // XXX
        iccFh.loadEFLinearFixedAll(EF_SMS, obtainMessage(EVENT_GET_ALL_SMS_DONE));
        recordsToLoad++;
    }
    if (CRASH_RIL) {
        String sms = "0107912160130310f20404d0110041007030208054832b0120" + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" + "ffffffffffffffffffffffffffffff";
        byte[] ba = IccUtils.hexStringToBytes(sms);
        iccFh.updateEFLinearFixed(EF_SMS, 1, ba, null, obtainMessage(EVENT_MARK_SMS_READ_DONE, 1));
    }
}
Also used : AdnRecordLoader(com.android.internal.telephony.AdnRecordLoader) IccFileHandler(com.android.internal.telephony.IccFileHandler)

Aggregations

AdnRecordLoader (com.android.internal.telephony.AdnRecordLoader)2 IccFileHandler (com.android.internal.telephony.IccFileHandler)2