Этот коммит содержится в:
Anton Tananaev
2023-04-05 22:41:05 -07:00
родитель 88cc37e96e
Коммит 4eacf30897
+1 -1
Просмотреть файл
@@ -30,7 +30,7 @@ class GooglePositionProvider(context: Context, listener: PositionListener) : Pos
@Suppress("DEPRECATION", "MissingPermission") @Suppress("DEPRECATION", "MissingPermission")
override fun startUpdates() { override fun startUpdates() {
val locationRequest = LocationRequest() val locationRequest = LocationRequest()
locationRequest.priority = getPriority(preferences.getString(MainFragment.KEY_ACCURACY,"medium")) locationRequest.priority = getPriority(preferences.getString(MainFragment.KEY_ACCURACY, "medium"))
locationRequest.interval = if (distance > 0 || angle > 0) MINIMUM_INTERVAL else interval locationRequest.interval = if (distance > 0 || angle > 0) MINIMUM_INTERVAL else interval
fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, Looper.getMainLooper()) fusedLocationClient.requestLocationUpdates(locationRequest, locationCallback, Looper.getMainLooper())
} }