android Telephony学习 --- 第三篇 Phone的创建

上一篇已经了解了phone的关系图,是否好奇phone是如何创建的呢,接下来我们看下phone的创建流程:

这里写图片描述

  • GsmCdmaPhone: PhoneFactory ->new GsmCdmaPhone
  • ImsPhone: ImsPhoneFactory -> new ImsPhone

这里关注下ImsPhone创建过程的备注,default phone ready后才能创建Imsphone:

// Start monitoring after defaults have been made.
// Default phone must be ready before ImsPhone is created
// because ImsService might need it when it is being opened.
for (int i = 0; i < numPhones; i++) {
   sPhones[i].startMonitoringImsService();
}

猜你喜欢

转载自blog.csdn.net/tingsky9985/article/details/79899695