一、Dialer:
DialpadFragment.handleDialButtonPressed(PreCall.start()) → DialerUtils.startActivityWithErrorToast(placeCallOrMakeToast(context, intent)) → TelecomUtil.placeCall(getTelecomManager(context).placeCall()) → TelecomManager.placeCall()

二、Telecom Frameworks:
TelecomManager.placeCall() → ITelecomService.placeCall() → TelecomServiceImpl.placeCall(private final ITelecomService.Stub mBinderImpl = new ITelecomService.Stub())

三、Telecom Services:
TelecomServiceImpl.placeCall(mUserCallIntentProcessorFactory.create(mContext, userHandle).processIntent) → UserCallIntentProcessor.processIntent(processOutgoingCallIntent(sendIntentToDestination())) → PrimaryCallReceiver.onReceive() → CallIntentProcessor.processIntent(processOutgoingCallIntent(sendNewOutgoingCallIntent())) → NewOutgoingCallIntentBroadcaster.processIntent(broadcastIntent(Intent.ACTION_NEW_OUTGOING_CALL)) → this.NewOutgoingCallBroadcastIntentReceiver.onReceive(placeOutgoingCallImmediately()) → CallsManager.placeOutgoingCall(call.startCreateConnection) → Call.startCreateConnection(mCreateConnectionProcessor.process()) → CreateConnectionProcessor.process(attemptNextPhoneAccount(mService.createConnection(mCall, CreateConnectionProcessor.this))) → ConnectionServiceWrapper.createConnection(mBinder.bind(callback, call)) → ServiceBinder.Binder2.bind(ServiceConnection connection = new ServiceBinderConnection(call)) → ServiceBinderConnection.onServiceConnected() 
1、onServiceConnected(setBinder(binder).setServiceInterface(binder)) → ConnectionServiceWrapper.setServiceInterface() → mServiceInterface = IConnectionService.Stub.asInterface(binder) 获取远程IConnectionService服务的aidl接口
2、onServiceConnected(handleSuccessfulConnection(callback.onSuccess())) → ConnectionServiceWrapper.createConnection(onSuccess(mServiceInterface.createConnection())) → ConnectionService.createConnection
备注:
1、NewOutgoingCallIntentBroadcaster.processIntent中主要对三种类型call的一些检查:普通call Intent.ACTION_CALL,系统call Intent.ACTION_CALL_PRIVILEGED,紧急呼叫call Intent.ACTION_CALL_EMERGENCY。最后调用broadcastIntent(intent, number, !callImmediately, targetUser);
2、从Call.startCreateConnection开始和来电的五是一样的流程

四、Telecom Frameworks:
ConnectionService.createConnection(mHandler.obtainMessage(MSG_CREATE_CONNECTION, args).sendToTarget()) → mHandler(case MSG_CREATE_CONNECTION(createConnection())) → onCreateOutgoingConnection(空实现,找子类) → TelephonyConnectionService.onCreateOutgoingConnection
备注:
1、ConnectionService.createConnection是protected IBinder mBinder = new IConnectionService.Stub()中实现的方法,之前mServiceInterface调用AIDL过来的。

五、Telephony Services:
TelephonyConnectionService.onCreateOutgoingConnection(placeOutgoingConnection(originalConnection = phone.dial())) → GsmCdmaPhone.dial()
备注:
1、onCreateOutgoingConnection里主要跟进getTelephonyConnection和placeOutgoingConnection,getTelephonyConnection很长,关键代码:final TelephonyConnection connection = createConnectionFor()通过getTelephonyConnection方法根据对于的pnone类型进行创建连接,并添加监听,获取到connection对象。

六、Telephony Frameworks:
GsmCdmaPhone.dial(dialInternal(mCT.dial(newDialString))) → GsmCdmaCallTracker.dial(mCi.dial(mPendingMO.getAddress(), clirMode, uusInfo, obtainCompleteMessage())) → RIL.dial(radioProxy.dial(rr.mSerial, dialInfo))
备注:
1、obtainCompleteMessage方法中调用到operationComplete(),mCi.getCurrentCalls(mLastRelevantPoll);什么的,用来查询当前call情况

七、RILD层:
IRadio.dial() → ril_service.cpp(dial)

八、Telecom Frameworks:
createConnection(handleCreateConnectionComplete) → IConnectionServiceAdapter.handleCreateConnectionComplete → ConnectionServiceWrapper.this.handleCreateConnectionComplete()
备注:
1、ConnectionServiceWrapper中实现了private final class Adapter extends IConnectionServiceAdapter.Stub
备注:
1、如同来电第七/八点,从去电第五点返回connection对象

九、Telecom Services:
ConnectionServiceWrapper.this.handleCreateConnectionComplete() → CreateConnectionProcessor.hanleCreateConnectionSuccess(mCallResponse.handleCreateConnectionSuccess(idMapper, connection)) → Call.onSuccessfulOutgoingCall(l.onSuccessfulOutgoingCall(this)) → CallsManager.onSuccessfulOutgoingCall() → setCallState() → listener.onCallStateChanged(call, oldState, newState) → IncallController.onCallStateChanged(updateCall(inCallService.updateCall(parcelableCall))) → IncallService.updateCall()
备注:
1、CallsManager.onSuccessfulOutgoingCall中setCallState()后markCallAsDialing(call)

十、Telecom Frameworks:
IncallService.updateCall() → Phone.internalUpdateCall() → Call.internalUpdate() → DialerCall(更新上层)

【私人备忘录】Android P 去电代码流程相关推荐

  1. Android N 去电流程,【私人备忘录】Android P 去电代码流程

    一.Dialer: DialpadFragment.handleDialButtonPressed(PreCall.start()) → DialerUtils.startActivityWithEr ...

  2. 期末android备忘录代码,【私人备忘录】Android P 去电代码流程

    一.Dialer: DialpadFragment.handleDialButtonPressed(PreCall.start()) → DialerUtils.startActivityWithEr ...

  3. android加载efi分区,高通Android UEFI XBL 代码流程分析

    高通Android UEFI XBL 代码流程分析 背景 之前学习的lk阶段点亮LCD的流程算是比较经典,但是高通已经推出了很多种基于UEFI方案的启动架构. 所以需要对这块比较新的技术进行学习.在学 ...

  4. Android 通话录音代码流程

    通话录音: 从界面开始找代码,最后转了几个函数名,并转到多媒体录音模块  start_ record   voiceRecordClicked  --- CallButtonFragment.java ...

  5. android系统自动休眠代码流程,Android P 电源管理(4)待机流程

    电视遥控器,短端走待机(str待机)流程, 长按是关机,走关机流程,记录下待机流程. 参考博客 待机流程 Android P引入自动待机功能,只有存在WakeLock,wakeup_count就不会为 ...

  6. Android 中的WiFi学习笔记(转载)----WIFI启动 代码流程走读---网络连接流程

    Android的WiFi 我们通常看到WiFi的守护进程wpa_supplicant在我们的ps的进程列表中,这个就是我们的wifi守护进程.wpa_supplicant在external/wpa_s ...

  7. android uefi 编译报错,【Android SDM660开机流程】- UEFI XBL 代码流程分析

    [Android SDM660开机流程]- UEFI XBL 代码流程分析 一.UEFI XBL 1.1 boot_images代码目录 1.2 UEFI代码运行流程 1.3 SEC (安全验证) 1 ...

  8. Android 10.0热点为Enhanced Open模式时不允许WiFI和热点同时开启代码流程梳理

    前言: WLAN Enhanced Open 官方介绍 WLAN Enhanced Open :WiFi增强开放,这个功能就是当手机开启热点时,Securty的一个选项,与WPA2/WPA3同级,En ...

  9. 全志 android 编译,全志A20启动代码流程分析 ——Android

    现在的CPU都固化了内部 ROM,内部 ROM中有一般都有一段程序,一般有如下几个功能: 1,初始化,部分外设,如USB,SDCARD 2,初始化DDR(内存)和NandFlash 3,加载boot( ...

最新文章

  1. NYOJ 636 世界末日
  2. ​如何编写高质量的C#代码(一)
  3. min—width的使用
  4. obs之libx264编码
  5. 指令:当文字显示不全时显示tooltip提示框
  6. mysql安装包及驱动下载
  7. 黄河中下游地区精化似大地水准面研究与实施
  8. matplotlib绘制饼图
  9. 4天上线“战疫”小程序,腾讯敏捷在数字广东的落地实践
  10. 如何获取sha1值和MD5值
  11. ibm服务器x3650m4引导,IBM X3650 M4安装win 2008 Server操作指南
  12. 【MySQL】Schema与数据类型优化
  13. Unity支持GIF,零卡顿,秒解码
  14. python:实现二进制补码算法(附完整源码)
  15. SpringBoot项目开发(十):引用本地jar包与打包本地jar
  16. 5GC行业市场分析报告(论证)
  17. Oracle11g客户端安装与配置
  18. css文件转换html,你怎么能编程方式(或工具).MHT MHTML文件转换为普通的HTML和CSS文件?(How can...
  19. 微信公众号HTML,H5页面莫名其妙,无故多出广告来,解决办法
  20. 快速开发GD32和涂鸦CBU模组通信

热门文章

  1. 全网采集壁纸360网站全网壁纸
  2. 测试员如何推进项目进度?
  3. c# 处理Excel数据
  4. Windows/Linux性能监控软件>csv文件,方便生成图表
  5. 数据结构(C语言第二版)严蔚敏编,数据结构电子教材,线性表,栈,队列,顺序存储结构,初始化,入栈,出栈,入队,出队,c++
  6. 数据结构与算法分析(十六)--- 如何设计更高效的字符串匹配算法?(BF + RK + KMP + BMH)
  7. NTFS安全权限 3th
  8. 算力新话题,畅聊算力之新民生
  9. Java中二进制与十六进制的转换
  10. 无法同步谷歌日历_苹果日历不能添加日程提醒怎么办?云提醒软件为你罗列待办事项...