Fix concurrent issue
- Add a thread lock Fix: 286495550 Test: make pass Change-Id: I72877551bda18cf93734d270770a0bd53bab465b
This commit is contained in:
@@ -295,7 +295,9 @@ public class MobileNetworkRepository extends SubscriptionManager.OnSubscriptions
|
||||
}
|
||||
|
||||
public void removeRegister(MobileNetworkCallback mobileNetworkCallback) {
|
||||
synchronized (this) {
|
||||
sCallbacks.remove(mobileNetworkCallback);
|
||||
}
|
||||
if (sCallbacks.isEmpty()) {
|
||||
mSubscriptionManager.removeOnSubscriptionsChangedListener(this);
|
||||
mAirplaneModeObserver.unRegister(mContext);
|
||||
|
Reference in New Issue
Block a user