ImsStateTracker: fix ImsStateCallback call on the same SIM card
The ImsStateCallback is automatically removed after calling
ImsStateCallback#onUnavailable() when the subscription is inactive, but
the ImsStateTracker doesn't clear this callback so it can't receive the
available callback even if the IMS service is available.
This is to clear the ImsStateCallback when receiving onUnavailable() so
that this callback can be re-registered when the subscription is active
again.
Bug: 265376924
Test: atest ImsStateTrackerTest
Test: manual (verify ImsStateCallback calls when removing and inserting
the same SIM card)
Change-Id: I1ebf4c8cf1af0aca9ae0baeed3d82b801164e962
2 files changed