Guard against creating too many MobileSignalControllers
The PhoneStateListener that got added to NetworkControllerImpl used the default (main) looper for its callbacks, which caused race conditions when updating subscriptions. This resulted in zombie MobileSignalControllers that were untracked and never stopped listening for their updates. To fix the problem we put the phone state listener on the same background thread as the receiver handler, and also lock around updating the subscriptions so that we can all have peace of mind. This should fix a host of issues where the mobile signal is incorrectly showing state such as disconnected or not showing the data type indicator. Fixes: 129717207 Test: visual; remove and insert sim and verify that the proper SIM state is shown Change-Id: Iace6a04c0629e24d2ef9c980a8de336a225d0f36
Loading
Please register or sign in to comment