Search in sources :

Example 6 with AdnRecord

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

the class UsimPhoneBookManager method handleMessage.

@Override
public void handleMessage(Message msg) {
    AsyncResult ar;
    switch(msg.what) {
        case EVENT_PBR_LOAD_DONE:
            ar = (AsyncResult) msg.obj;
            if (ar.exception == null) {
                createPbrFile((ArrayList<byte[]>) ar.result);
            }
            synchronized (mLock) {
                mLock.notify();
            }
            break;
        case EVENT_USIM_ADN_LOAD_DONE:
            log("Loading USIM ADN records done");
            ar = (AsyncResult) msg.obj;
            if (ar.exception == null) {
                mPhoneBookRecords.addAll((ArrayList<AdnRecord>) ar.result);
            }
            synchronized (mLock) {
                mLock.notify();
            }
            break;
        case EVENT_IAP_LOAD_DONE:
            log("Loading USIM IAP records done");
            ar = (AsyncResult) msg.obj;
            if (ar.exception == null) {
                mIapFileRecord = ((ArrayList<byte[]>) ar.result);
            }
            synchronized (mLock) {
                mLock.notify();
            }
            break;
        case EVENT_EMAIL_LOAD_DONE:
            log("Loading USIM Email records done");
            ar = (AsyncResult) msg.obj;
            if (ar.exception == null) {
                mEmailFileRecord = ((ArrayList<byte[]>) ar.result);
            }
            synchronized (mLock) {
                mLock.notify();
            }
            break;
    }
}
Also used : AdnRecord(com.android.internal.telephony.AdnRecord) ArrayList(java.util.ArrayList) AsyncResult(android.os.AsyncResult)

Aggregations

AdnRecord (com.android.internal.telephony.AdnRecord)6 AdnRecordLoader (com.android.internal.telephony.AdnRecordLoader)3 AsyncResult (android.os.AsyncResult)2 ArrayList (java.util.ArrayList)2 Message (android.os.Message)1 RemoteException (android.os.RemoteException)1 IIccPhoneBook (com.android.internal.telephony.IIccPhoneBook)1 IccVmFixedException (com.android.internal.telephony.IccVmFixedException)1 IccVmNotSupportedException (com.android.internal.telephony.IccVmNotSupportedException)1