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