Ensure proper lock is held for all removal ops

We need to hold the local lock when invoking any operation which can
cause local callbacks, etc.

Bug: 162715416
Test: manual + presubmit
Change-Id: I4f95b58310c7d1eff00656c02aae6dfb69255cdf
This commit is contained in:
Soonil Nagarkar
2020-08-24 09:37:11 -07:00
parent 3bec8f1a14
commit 20a2896756

View File

@@ -313,6 +313,14 @@ class LocationProviderManager extends
}
}
@Override
public final <Listener> void onOperationFailure(ListenerOperation<Listener> operation,
Exception e) {
synchronized (mLock) {
super.onOperationFailure(operation, e);
}
}
@Override
public final LocationRequest getRequest() {
return mProviderLocationRequest;