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) forwardErrorToCallbacks(error)
} }
@Synchronized
private fun addCallback(callback: Callback) { private fun addCallback(callback: Callback) {
callbacks.add(callback) callbacks.add(callback)
} }
@Synchronized
private fun removeCallback(callback: Callback) { private fun removeCallback(callback: Callback) {
callbacks.remove(callback) callbacks.remove(callback)
} }
@Synchronized
private fun onCallbackActionNoArg(action: Callback.() -> Unit) { private fun onCallbackActionNoArg(action: Callback.() -> Unit) {
callbacks.forEach(action) callbacks.forEach(action)
} }
@Synchronized
private fun forwardErrorToCallbacks(error: Throwable) { private fun forwardErrorToCallbacks(error: Throwable) {
callbacks.forEach { it.onLocationServiceError(error) } callbacks.forEach { it.onLocationServiceError(error) }
} }