Fix CarrierServiceConnection binding leak in CarrierConfigLoader
Root cause:
Two config fetching process bind two CarrierServiceConnection.
The unbinding of the obsoleted connection reset the global flag
mServiceBound[phoneId] which prevent the new connection from unbinding.
Solution:
Instead of storing bind status in global variable. This CL make
CarrierServiceConnection maintain bind status itself. The bind
status is set to true whenever the bindService succeed and
false in initial state and whenever unbindService is called.
Bug: 197357369
Test: atest CarrierConfigLoaderTest
Merged-In: If7926102f3afb74fbab5231c2875fbad5a69c7e3
Change-Id: If7926102f3afb74fbab5231c2875fbad5a69c7e3
(cherry picked from commit dba4ccd5f8910c7dcf933f6ad61b385db91ccb22)
1 file changed