Search in sources :

Example 6 with AsyncResult

use of android.os.AsyncResult in project XobotOS by xamarin.

the class CdmaMmiCode method handleMessage.

public void handleMessage(Message msg) {
    AsyncResult ar;
    if (msg.what == EVENT_SET_COMPLETE) {
        ar = (AsyncResult) (msg.obj);
        onSetComplete(ar);
    } else {
        Log.e(LOG_TAG, "Unexpected reply");
    }
}
Also used : AsyncResult(android.os.AsyncResult)

Example 7 with AsyncResult

use of android.os.AsyncResult in project XobotOS by xamarin.

the class PhoneBase method notifyPreciseCallStateChangedP.

/**
     * Subclasses of Phone probably want to replace this with a
     * version scoped to their packages
     */
protected void notifyPreciseCallStateChangedP() {
    AsyncResult ar = new AsyncResult(null, this, null);
    mPreciseCallStateRegistrants.notifyRegistrants(ar);
}
Also used : AsyncResult(android.os.AsyncResult)

Example 8 with AsyncResult

use of android.os.AsyncResult in project XobotOS by xamarin.

the class PhoneBase method handleMessage.

/**
     * When overridden the derived class needs to call
     * super.handleMessage(msg) so this method has a
     * a chance to process the message.
     *
     * @param msg
     */
@Override
public void handleMessage(Message msg) {
    AsyncResult ar;
    switch(msg.what) {
        case EVENT_CALL_RING:
            Log.d(LOG_TAG, "Event EVENT_CALL_RING Received state=" + getState());
            ar = (AsyncResult) msg.obj;
            if (ar.exception == null) {
                Phone.State state = getState();
                if ((!mDoesRilSendMultipleCallRing) && ((state == Phone.State.RINGING) || (state == Phone.State.IDLE))) {
                    mCallRingContinueToken += 1;
                    sendIncomingCallRingNotification(mCallRingContinueToken);
                } else {
                    notifyIncomingRing();
                }
            }
            break;
        case EVENT_CALL_RING_CONTINUE:
            Log.d(LOG_TAG, "Event EVENT_CALL_RING_CONTINUE Received stat=" + getState());
            if (getState() == Phone.State.RINGING) {
                sendIncomingCallRingNotification(msg.arg1);
            }
            break;
        default:
            throw new RuntimeException("unexpected event not handled");
    }
}
Also used : AsyncResult(android.os.AsyncResult)

Example 9 with AsyncResult

use of android.os.AsyncResult in project XobotOS by xamarin.

the class CDMALTEPhone method handleMessage.

@Override
public void handleMessage(Message msg) {
    AsyncResult ar;
    Message onComplete;
    switch(msg.what) {
        // handle the select network completion callbacks.
        case EVENT_SET_NETWORK_MANUAL_COMPLETE:
            handleSetSelectNetwork((AsyncResult) msg.obj);
            break;
        default:
            super.handleMessage(msg);
    }
}
Also used : Message(android.os.Message) AsyncResult(android.os.AsyncResult)

Example 10 with AsyncResult

use of android.os.AsyncResult in project XobotOS by xamarin.

the class CDMAPhone method handleExitEmergencyCallbackMode.

private void handleExitEmergencyCallbackMode(Message msg) {
    AsyncResult ar = (AsyncResult) msg.obj;
    if (DBG) {
        Log.d(LOG_TAG, "handleExitEmergencyCallbackMode,ar.exception , mIsPhoneInEcmState " + ar.exception + mIsPhoneInEcmState);
    }
    // Remove pending exit Ecm runnable, if any
    removeCallbacks(mExitEcmRunnable);
    if (mEcmExitRespRegistrant != null) {
        mEcmExitRespRegistrant.notifyRegistrant(ar);
    }
    // if exiting ecm success
    if (ar.exception == null) {
        if (mIsPhoneInEcmState) {
            mIsPhoneInEcmState = false;
            setSystemProperty(TelephonyProperties.PROPERTY_INECM_MODE, "false");
        }
        // send an Intent
        sendEmergencyCallbackModeChange();
        // Re-initiate data connection
        mDataConnectionTracker.setInternalDataEnabled(true);
    }
}
Also used : AsyncResult(android.os.AsyncResult)

Aggregations

AsyncResult (android.os.AsyncResult)42 Message (android.os.Message)10 Registrant (android.os.Registrant)5 SmsMessage (android.telephony.SmsMessage)2 GsmCellLocation (android.telephony.gsm.GsmCellLocation)2 AdnRecord (com.android.internal.telephony.AdnRecord)2 ArrayList (java.util.ArrayList)2 AlertDialog (android.app.AlertDialog)1 CanceledException (android.app.PendingIntent.CanceledException)1 AdnRecordLoader (com.android.internal.telephony.AdnRecordLoader)1 CallForwardInfo (com.android.internal.telephony.CallForwardInfo)1 IccException (com.android.internal.telephony.IccException)1 CdmaInformationRecords (com.android.internal.telephony.cdma.CdmaInformationRecords)1 GsmConnection (com.android.internal.telephony.gsm.GsmConnection)1 SuppServiceNotification (com.android.internal.telephony.gsm.SuppServiceNotification)1