Search in sources :

Example 1 with IIccPhoneBook

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

the class IccProvider method loadFromEf.

private ArrayList<ArrayList> loadFromEf(int efType) {
    ArrayList<ArrayList> results = new ArrayList<ArrayList>();
    List<AdnRecord> adnRecords = null;
    if (DBG)
        log("loadFromEf: efType=" + efType);
    try {
        IIccPhoneBook iccIpb = IIccPhoneBook.Stub.asInterface(ServiceManager.getService("simphonebook"));
        if (iccIpb != null) {
            adnRecords = iccIpb.getAdnRecordsInEf(efType);
        }
    } catch (RemoteException ex) {
    // ignore it
    } catch (SecurityException ex) {
        if (DBG)
            log(ex.toString());
    }
    if (adnRecords != null) {
        // Load the results
        int N = adnRecords.size();
        if (DBG)
            log("adnRecords.size=" + N);
        for (int i = 0; i < N; i++) {
            loadRecord(adnRecords.get(i), results);
        }
    } else {
        // No results to load
        Log.w(TAG, "Cannot load ADN records");
        results.clear();
    }
    if (DBG)
        log("loadFromEf: return results");
    return results;
}
Also used : AdnRecord(com.android.internal.telephony.AdnRecord) IIccPhoneBook(com.android.internal.telephony.IIccPhoneBook) ArrayList(java.util.ArrayList) RemoteException(android.os.RemoteException)

Aggregations

RemoteException (android.os.RemoteException)1 AdnRecord (com.android.internal.telephony.AdnRecord)1 IIccPhoneBook (com.android.internal.telephony.IIccPhoneBook)1 ArrayList (java.util.ArrayList)1