Merge "Fix concurrent issue" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
cc8c5c8600
@@ -295,7 +295,9 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions
|
||||
}
|
||||
|
||||
public void removeRegister(MobileNetworkCallback mobileNetworkCallback) {
|
||||
sCallbacks.remove(mobileNetworkCallback);
|
||||
synchronized (this) {
|
||||
sCallbacks.remove(mobileNetworkCallback);
|
||||
}
|
||||
if (sCallbacks.isEmpty()) {
|
||||
mSubscriptionManager.removeOnSubscriptionsChangedListener(this);
|
||||
mAirplaneModeObserver.unRegister(mContext);
|
||||
|
Reference in New Issue
Block a user