Remove non necessary @Synchronized annotations in LocationSharingServiceConnection

This commit is contained in:
Maxime NATUREL 2022-06-24 17:08:14 +02:00
parent 945026730c
commit f57c46de9a

View file

@ -74,22 +74,18 @@ class LocationSharingServiceConnection @Inject constructor(
forwardErrorToCallbacks(error)
}
@Synchronized
private fun addCallback(callback: Callback) {
callbacks.add(callback)
}
@Synchronized
private fun removeCallback(callback: Callback) {
callbacks.remove(callback)
}
@Synchronized
private fun onCallbackActionNoArg(action: Callback.() -> Unit) {
callbacks.forEach(action)
}
@Synchronized
private fun forwardErrorToCallbacks(error: Throwable) {
callbacks.forEach { it.onLocationServiceError(error) }
}