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

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

创建gsmphone.imsphone流程.png
  • 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();
}

你可能感兴趣的:(android Telephony学习 --- 第三篇 Phone的创建)