一、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 N 去电流程,【私人备忘录】Android P 去电代码流程相关推荐

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

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

  2. 3-uboot-spl代码流程

    [uboot] (第三章)uboot流程--uboot-spl代码流程 2016年10月28日 16:24:14 阅读数:2077 以下例子都以project X项目tiny210(s5pv210平台 ...

  3. ORB_SLAM2 原理、论文解读、代码流程

    ORB_SLAM2 原理+论文解读+代码流程 算法原理 Tracking LocalMapping LoopClosing 代码流程 文件的调用关系 重要变量的数据结构 Tracking流程 Loca ...

  4. 【私人备忘录】Android P ActivityManagerService(六)进程管理

    Android中参与进程管理的主要模块是ActivityManager,其依赖于LRU weight,OOM adj和lmkd机制(新版Low Memory Killer)共同完成进程管理. 一.LR ...

  5. 【Android 逆向】整体加固脱壳 ( DexClassLoader 加载 dex 流程分析 | RawDexFile.cpp 分析 | dvmRawDexFileOpen函数读取 DEX 文件 )

    文章目录 前言 一.RawDexFile.cpp 中 dvmRawDexFileOpen() 方法分析 前言 上一篇博客 [Android 逆向]整体加固脱壳 ( DexClassLoader 加载 ...

  6. 【Android 逆向】整体加固脱壳 ( DexClassLoader 加载 dex 流程分析 | 查找 DexFile 对应的C代码 | dalvik_system_DexFile.cpp 分析 )

    文章目录 前言 一.查找 DexFile 对应的 C++ 代码 1.根据 Native 文件命名惯例查找 C++ 代码 2.根据方法名查找 二.dalvik_system_DexFile.cpp 源码 ...

  7. 【Android 逆向】整体加固脱壳 ( DexClassLoader 加载 dex 流程分析 | DexFile loadDexFile 函数 | 构造函数 | openDexFile 函数 )

    文章目录 前言 一.DexFile.loadDexFile 函数分析 二.DexFile 构造函数分析 三.DexFile.openDexFile 函数分析 前言 上一篇博客 [Android 逆向] ...

  8. 【Android 逆向】整体加固脱壳 ( DexClassLoader 加载 dex 流程分析 | DexPathList 中根据 File 加载 DexFile | loadDexFile 分析 )

    文章目录 前言 一.根据 File 加载 DexFile 二.DexPathList.loadDexFile 函数分析 前言 上一篇博客 [Android 逆向]整体加固脱壳 ( DexClassLo ...

  9. 【Android 逆向】整体加固脱壳 ( DexClassLoader 加载 dex 流程分析 | DexPathList 构造函数分析 | makeDexElements 函数分析 )

    文章目录 前言 一.DexPathList 构造函数分析 二.DexPathList.makeDexElements 函数分析 三.Element 类分析 前言 上一篇博客 [Android 逆向]整 ...

  10. 【Android 逆向】加壳的 Android 应用启动流程 | 使用反射替换 LoadedApk 中的类加载器流程

    文章目录 一.加壳的 Android 应用启动流程 二.使用反射替换 LoadedApk 中的类加载器流程 一.加壳的 Android 应用启动流程 加壳的 Android 应用启动流程 : 加壳的 ...

最新文章

  1. 实名羡慕!蚂蚁员工激励达 1376.9 亿,人均能在杭州买套 283 平的房子?
  2. linux c 定时器
  3. RBF:RBF基于近红外光谱的汽油辛烷值含量预测结果对比
  4. 弱引用什么时候被回收_ThreadLocal的内存泄露?什么原因?如何避免?
  5. python 判断子序列_LeetCode 392. 判断子序列 | Python
  6. [渝粤教育] 三江学院 软件测试 参考 资料
  7. iOS开发~UI布局(二)storyboard中autolayout和size class的使用详解
  8. 奥数会不会彻底被信息奥赛取代?
  9. Java 中array.size()_Java ArrayDeque size()方法与示例
  10. 软件测试方法的分类细谈
  11. poj_3628 动态规划
  12. 学完python能做什么-学完Python开发可以从事哪些行业?
  13. 苹果mac轻量级思维导图软件:Xmind
  14. WindowsXP-SP2精简美化版【210M】
  15. RPC规范接口实现模块Flask-JSONRPC
  16. 芭比Q了,腰间盘给整突出了
  17. 田野调查手记·浮山篇(三)
  18. excel表格公式无效、不生效的解决方案及常见问题、常用函数
  19. 达观知识图谱, 辅助企业智能运营和决策
  20. BASH脚本基础:语法检查与调试

热门文章

  1. CCF201809-4 再卖菜
  2. Java Web-网页基础-HTML-选择器Selector-DOM
  3. python爬取新闻存入数据库_python 爬取古诗文存入mysql数据库的方法
  4. 递归下降分析法的基本思想。_还不懂这八大算法思想,刷再多题也白搭!
  5. 直播 | 循序渐进 - DM8 数据存储管理
  6. 2场直播丨OGG日常运维及故障处理、云原生数据仓库AnalyticDB
  7. 分布式锁用Redis坚决不用Zookeeper?
  8. 混合编程:如何用pybind11调用C++
  9. 边缘计算是流行词还是风口?开发者怎样选开源项目?
  10. 过滤器 和 拦截器 6个区别,别再傻傻分不清了