CarrierConfigLoader: Always remove the timeout msg when receive result
Root cause:
Multiple config fetch sessions interleave with each other in different paths.
When one fetch session receives the result of default config and find the
ServiceConnection is stale (due to the new ServiceConnection created for
carrier config in other session), the original timeout msg is not removed.
The coming timeout msg assigns default config with stub config, although at
that time, both default and carrier config have been fetched in other session.
Solution:
Remove timeout msg when onReiveResult is called. At that time, we know
we have received result (whether success or not).
Alternative solutions:
While a full solution to throughly fix the interleaving problem
is prepared (aosp/1660529), the complexity make it more risky.
It will be landed on T release instead.
Bug: 181500325
Test: atest com.android.phone.CarrierConfigLoaderTest
Change-Id: Ied3c3ad96d654e6c5ab7160b12a25e64cf2f0d8c
1 file changed