前言
本文代码基于 Android S。
框架

Ims 框架的核心是 ImsService ,它向 phone fw 提供 aidl 接口。这些接口提供 ims 相关的所有信息。
更直观的表示:
其中:
IImsMmTelFeature 提供 ims call 相关的信息;
IImsRcsFeature 提供 ims rcs 相关的信息;
IImsRegistration 提供 ims feature 注册状态的信息;
等。
框架中主要类介绍及其作用
ImsService:


IMS 绑定流程
phone 进程启动后,会调用 ImsResolver 管理它设备上所有 Ims feature 的 services 的绑定,实际绑定操作由 ImsServiceController 执行,绑定成功后,每个 ImsService 都会返回其对应的 IImsServiceController 接口,phone fw 可以通过这个 IImsServiceController 接口注册 IImsFeatureStatusCallback 等回调或获取 MmTelFeature 相关的接口 IImsMmTelFeature 等。
简述为:

有的应用需要监听某个 ImsFeature 的状态变更, 可以使用 FeatureConnector 来注册监听。
FeatureConnector 用来管理和 ImsFeature manager 的连接,所有和 ImsFeature 的连接(IIMmTelFeature、IImsRcsFeature)都存储在 ImsFeatureBinderRepository 中,FeatureConnector 会向透传监听到这个存储库,然后统一处理 callback 结果封装返回给注册方。如下:
具体流程如下:

原创文章,欢迎转载,但请注明出处。
网友评论