1.DialpadFragment.java,onClick()->dialButtonPressed()
2.OutgoingCallBroadcaster.java,onCreate()
sendOrderedBroadcast(broadcastIntent, PERMISSION, new OutgoingCallReceiver(),
null, // scheduler
Activity.RESULT_OK, // initialCode
number, // initialData: initial value for the result data
null); // initialExtras
3.OutgoingCallReceiver,doReceive()->startSipCallOptionHandler()
4.SipCallOptionHandler.java,onCreate()->setResultAndFinish()
PhoneApp.getInstance().callController.placeCall(mIntent);
5.CallController.java,placeCall()
placeCallInternal->PhoneUtils.java,placeCall()->CallManager.java,dial()->CDMAPhone.java,dial()->RIL.java,dial()
mApp.displayCallScreen();
6.PhoneApp.java,startActivity(createInCallIntent())
7.InCallScreen.java,onCreate()(第一次)onNewIntent()(非第一次)
onResume()->syncWithPhoneState()->updateScreen()(更新通话界面)->mCallCard.updateState(mPhone);
8.CallCard.java,updateState()->updateForegroundCall()->displayMainCallStatus()->updateDisplayForPerson()
9.CdmaCallTracker.java,operationComplete()->EVENT_POLL_CALLS_RESULT(cm.getCurrentCalls请求CLCC命令)->handlePollCalls()->phone.notifyPreciseCallStateChanged
来电过程
1.CdmaCallTracker.java,EVENT_CALL_STATE_CHANGE->EVENT_POLL_CALLS_RESULT->handlePollCalls()->phone.notifyNewRingingConnection(newRinging);
2.CallNotifier.java,PHONE_NEW_RINGING_CONNECTION->onNewRingingConnection()->startIncomingCallQuery()->PhoneUtils.startGetCallerInfo()
3.CallNotifier.java,onPhoneStateChanged()
4.InCallScreen.java,onPhoneStateChanged()
5.CallNotifier.java,onCustomRingQueryComplete()(mRinger.ring()响铃)->showIncomingCall()更新UI
6.如果接通电话,则调用InCallScreen.java,handleOnscreenButtonClick()->internalAnswerCall()->PhoneUtils.answerCall(ringing)(停止响铃,然后接听电话)
7.InCallScreen.java,onPhoneStateChanged()更新界面,完成接听电话功能。
通话界面更新
1.InCallScreen.java,handleOnscreenButtonClick()->updateInCallTouchUi()
2.InCallTouchUi.java,updateState()->updateInCallControls()->mInCallScreen.getUpdatedInCallControlState()
3.InCallControlState.java,update()