Android 11 拨号代码流程。
主页面:packages/apps/Dialer/java/com/android/dialer/main/impl/MainActivity.java
通过OldMainActivityPeer/NewMainActivityPeer,来控制加载不同的fragment。
拨号界面:DialpadFragment
快速拨号界面:OldSpeedDialFragment
通话记录界面:CallLogFragment
通讯录界面:ContactsFragment
下面是拨号代码流程,只简单记录整体流程。帮助了解整体流程走向。
packages\apps\Dialer\java\com\android\dialer\dialpadview\DialpadFragment.java
handleDialButtonPressed()->PreCall.start(getContext(), builder)
-->DialerUtils.startActivityWithErrorToast-->placeCallOrMakeToast()
-->TelecomUtil.placeCall(context, intent)-
-->TelecomManager.placeCall(intent.getData(), intent.getExtras())
-->TelecomServic-->TelecomServiceImpl.placeCall()
-->UserCallIntentProcessor.processIntent()-->processOutgoingCallIntent()-->sendIntentToDestination()
-->TelecomManager.handleCallIntent()
-->TelecomServic-->TelecomServiceImpl.handleCallIntent()
-->CallIntentProcessor..AdapterImpl.processOutgoingCallIntent()
--> CallIntentProcessor.processOutgoingCallIntent()
--> callsManager .startOutgoingCall()+NewOutgoingCallIntentBroadcaster.processCall()-->broadcastIntent()
-->NewOutgoingCallBroadcastIntentReceiver.onReceive()-->placeOutgoingCallImmediately()
-->CallsManager.placeOutgoingCall()
-->packages\services\Telecomm\src\com\android\server\telecom\Call.startCreateConnection()-->
-->CreateConnectionProcessor.process()-->attemptNextPhoneAccount()
-->ConnectionServiceWrapper.createConnection()
-->packages\services\Telecomm\src\com\android\server\telecom\ServiceBinder.Binder2.bind()-->
ServiceBinderConnection.onServiceConnected()-->handleSuccessfulConnection()-->
ConnectionServiceWrapper.createConnection().BindCallback.onSuccess()
-->ConnectionService.createConnection()-->
TelephonyConnectionService.onCreateOutgoingConnection()-->placeOutgoingConnection()
-->phone.dial()-->GsmCdmaPhone.dial()-->dialInternal()-->mCT.dial()
-->GsmCdmaCallTracker.dial()-->dialGsm()/dialCdma()-->mCi.dial()
-->CommandsInterface-->RIL.dial()--> radioProxy.dial()
进入HAL层。
hardware\ril\libril\ril_service.cpp
-->RadioImpl::dial()-->CALL_ONREQUEST-->s_vendorFunctions.onRequest(RIL_REQUEST_DIAL)
-->hardware\ril\reference-ril\reference-ril.s_callbacks.onRequest(RIL_REQUEST_DIAL)-->requestDial()-->at_send_command()
-->\hardware\ril\reference-ril\atchannel.at_send_command()-->at_send_command_full()-->at_send_command_full_nolock()-->writeline()-->write()
至此就把指令发给modem了,剩下的就是等待Modem主动上报call的状态.
每日语录:转到framework二个月了,慢慢熟悉了整体框架,知道某个模块出现bug,应该去哪儿找代码,对代码结构越来越熟悉。这无疑会缩短解决bug的时间。最近都是10点才到家,属于我的娱乐时间越来越少,待在电脑面前的时间越来越长,但是每天下班的那种充实感,都让我开心,每天早上醒来也是充满希望,想着今天继续学习什么东西。太喜欢这种生活了。高考都没这么认真,但凡高考有这么认真,211不是随便选(手动滑稽)。不过最近都没看书了,不是没有时间,是我都用来刷短视频了。不过,曼曼这么累,娱乐下应该的(手动微笑)。最后曼曼真棒,咋吃都不胖!加油!!!
单曲循环《百年孤寂》
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
