[Settings] Should remove the subcription listener

Bug: 268405538
Change-Id: Ic96fa0b9a294c3de54cea4b3be52d6f2807c0ada
Test: manual
This commit is contained in:
Zoey Chen
2023-02-15 06:57:58 +00:00
parent 3f7cdbf12b
commit cf9562beff

View File

@@ -185,6 +185,7 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions
}
public void removeRegister() {
mSubscriptionManager.removeOnSubscriptionsChangedListener(this);
if (mSubId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
mDataContentObserver.unRegister(mContext);
}