NetworkProvider: add missing synchronization
Adding missing lock to unregisterNetworkOffer() call. Test: TH Change-Id: Ia54664caaecb63e0bfa737903b48d08856fb4877
This commit is contained in:
parent
567b664d90
commit
aecfab5f72
1 changed files with 3 additions and 1 deletions
|
|
@ -326,7 +326,9 @@ public class NetworkProvider {
|
|||
public void unregisterNetworkOffer(final @NonNull NetworkOfferCallback callback) {
|
||||
final NetworkOfferCallbackProxy proxy = findProxyForCallback(callback);
|
||||
if (null == proxy) return;
|
||||
mProxies.remove(proxy);
|
||||
synchronized (mProxies) {
|
||||
mProxies.remove(proxy);
|
||||
}
|
||||
mContext.getSystemService(ConnectivityManager.class).unofferNetwork(proxy);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue