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;
}
Aggregations