Search in sources :

Example 6 with IccFileHandler

use of com.android.internal.telephony.uicc.IccFileHandler in project android_frameworks_opt_telephony by LineageOS.

the class Phone method getIccFileHandler.

/**
 * Retrieves the IccFileHandler of the Phone instance
 */
@UnsupportedAppUsage
public IccFileHandler getIccFileHandler() {
    UiccCardApplication uiccApplication = mUiccApplication.get();
    IccFileHandler fh;
    if (uiccApplication == null) {
        Rlog.d(LOG_TAG, "getIccFileHandler: uiccApplication == null, return null");
        fh = null;
    } else {
        fh = uiccApplication.getIccFileHandler();
    }
    Rlog.d(LOG_TAG, "getIccFileHandler: fh=" + fh);
    return fh;
}
Also used : IccFileHandler(com.android.internal.telephony.uicc.IccFileHandler) UiccCardApplication(com.android.internal.telephony.uicc.UiccCardApplication) UnsupportedAppUsage(android.compat.annotation.UnsupportedAppUsage)

Example 7 with IccFileHandler

use of com.android.internal.telephony.uicc.IccFileHandler in project android_frameworks_opt_telephony by LineageOS.

the class IccPhoneBookInterfaceManager method getAdnRecordsSize.

/**
 * Get the capacity of records in efid
 *
 * @param efid the EF id of a ADN-like ICC
 * @return  int[3] array
 *            recordSizes[0]  is the single record length
 *            recordSizes[1]  is the total length of the EF file
 *            recordSizes[2]  is the number of records in the EF file
 */
public int[] getAdnRecordsSize(int efid) {
    if (DBG)
        logd("getAdnRecordsSize: efid=" + efid);
    checkThread();
    Request getSizeRequest = new Request();
    synchronized (getSizeRequest) {
        // Using mBaseHandler, no difference in EVENT_GET_SIZE_DONE handling
        Message response = mBaseHandler.obtainMessage(EVENT_GET_SIZE_DONE, getSizeRequest);
        IccFileHandler fh = mPhone.getIccFileHandler();
        if (fh != null) {
            fh.getEFLinearRecordSize(efid, response);
            waitForResult(getSizeRequest);
        }
    }
    return getSizeRequest.mResult == null ? new int[3] : (int[]) getSizeRequest.mResult;
}
Also used : Message(android.os.Message) IccFileHandler(com.android.internal.telephony.uicc.IccFileHandler)

Aggregations

IccFileHandler (com.android.internal.telephony.uicc.IccFileHandler)7 UnsupportedAppUsage (android.compat.annotation.UnsupportedAppUsage)3 Message (android.os.Message)3 UiccCardApplication (com.android.internal.telephony.uicc.UiccCardApplication)3 SmsCbMessage (android.telephony.SmsCbMessage)2 SmsMessage (android.telephony.SmsMessage)2 IccRecords (com.android.internal.telephony.uicc.IccRecords)2 ArrayList (java.util.ArrayList)1