Fix race condition when TelephonyRegistry handles multi-SIM config change
TelephonyRegistry only updates some internal statuses related to
active modem count after receiving ACTION_MULTI_SIM_CONFIG_CHANGED.
If another component receives the same intent firstly and calls
TelephonyRegistryManager to either register or notify an event,
the internal status related to active modem count may not be able
to update yet, causing IAE saying e.g. phoneId is invalid.
To fix the issue, onMultiSimConfigChanged will be called to update
the internal statuses firstly before accessing them.
Bug: 230799289
Fix: 230773760
Test: atest TelephonyRegistryTest
Test: manual DS<->SS switching test
Change-Id: I31506a07406dee424546bfe4927e069280a7b011
1 file changed