• android4.0打电话,来电过程


    ICS 打电话流程
    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.setBeginningCall(true);//enable the proximity sensor
    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()


  • 相关阅读:
    Deep Reinforcement Learning: Pong from Pixels
    [TensorFlow] Creating Custom Estimators in TensorFlow
    [TensorFlow] Introducing TensorFlow Feature Columns
    [TensorFlow] Introduction to TensorFlow Datasets and Estimators
    [Golang] GoConvey测试框架使用指南
    [机器学习]一个例子完美解释朴素贝叶斯分类器
    [深度学习]理解RNN, GRU, LSTM 网络
    [深度学习]CNN--卷积神经网络中用1*1 卷积有什么作用
    Tensorflow学习笔记(2):tf.nn.dropout 与 tf.layers.dropout
    TensorFlow学习笔记(1):variable与get_variable, name_scope()和variable_scope()
  • 原文地址:https://www.cnblogs.com/chengliu/p/3636425.html
Copyright © 2020-2023  润新知