Trigger PhoneAccount registration from SUBINFO_RECORD_UPDATED
...instead of SIM_STATE_CHANGE.
1) TelecommAccountRegistry registers Phones with valid subId
2) Phones use SubscriptionController to get their subId
3) TelecommAccountRegistry was trying to reregister Phones when it
received a SIM_STATE_CHANGE intent.
The problem is that SubscriptionController also listens to the same
intent to update it's entries. So, due to this race between
SubscriptionController and TelecommAccountRegistry, Phone's subId
wouldn't yet be updated when it was needed for registering phone
Solution: Listen to an intent that indicates the SubscriptionController
has updated its entries instead.
1 file changed