6.2 IccCardProxy
在phone进程初始化过程中, PhoneProxy的构造方法中会构造IccCardProxy对象,
mIccCardProxy = new IccCardProxy(mContext, mCommandsInterface, mActivePhone.getPhoneId());
IccCardProxy的构造方法注册SIM卡状态变化的代码如下,
mUiccController.registerForIccChanged(this, EVENT_ICC_CHANGED, null);
UiccController的registerForIccChanged方法如下,
synchronized (mLock) {
Registrant r = new Registrant (h, what, obj);
mIccChangedRegistrants.add(r);
//Notify registrant right after registering, so that it will get the latest ICC status,
//otherwise which may not happen until there is an actual change in ICC status.
r.notifyRegistrant();
}
现在的问题是关键是什么时候调用?在UiccController的获取SIM卡状态完成之后,也就是onGetIccCardStatusDone方法中,
mIccChangedRegistrants.n