Unregister pending listeners in UiccProfile#dispose.
When the profile is brought up, if the device is not provisioned or the user is not unlocked, UiccProfile registers listeners for these events. Once the event is received, the corresponding listener is unregistered. However, it's possible that the profile is disposed (e.g. the SIM removed) prior to the event occuring. In this case, the listener would remain present; if a new SIM were inserted, it would be re-registered, likely causing adverse behavior. Ensure that any registered listeners are unregistered when a UiccProfile is disposed, even if the event has not yet occurred. Bug: 134530854 Test: Validated crash fix when removing SIM before unlock Change-Id: I00a6735229b9b91a17f4dc4e9bb092e94b73304f
Loading
Please register or sign in to comment