diff --git a/OsmAnd-telegram/src/net/osmand/telegram/TelegramLocationProvider.kt b/OsmAnd-telegram/src/net/osmand/telegram/TelegramLocationProvider.kt index 719e21b886..2a9f66aee4 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/TelegramLocationProvider.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/TelegramLocationProvider.kt @@ -46,8 +46,8 @@ class TelegramLocationProvider(private val app: TelegramApplication) : SensorEve private var fusedLocationProviderClient: FusedLocationProviderClient? = null private val locationRequest = LocationRequest().apply { interval = 1000 - fastestInterval = 500 - maxWaitTime = 2000 + //fastestInterval = 500 + maxWaitTime = 0 priority = LocationRequest.PRIORITY_HIGH_ACCURACY } private val locationCallback = object : LocationCallback() { diff --git a/OsmAnd-telegram/src/net/osmand/telegram/TelegramService.kt b/OsmAnd-telegram/src/net/osmand/telegram/TelegramService.kt index 2d85e971b0..80d3e05098 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/TelegramService.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/TelegramService.kt @@ -82,11 +82,11 @@ class TelegramService : Service(), TelegramIncomingMessagesListener, // Sets the fastest rate for active location updates. This interval is exact, and your // application will never receive updates more frequently than this value. - fastestInterval = 500 + //fastestInterval = 500 // Sets the maximum time when batched location updates are delivered. Updates may be // delivered sooner than this interval. - maxWaitTime = 2000 + maxWaitTime = 0 priority = LocationRequest.PRIORITY_HIGH_ACCURACY } diff --git a/OsmAnd/src-gms/net/osmand/plus/LocationServiceHelperImpl.java b/OsmAnd/src-gms/net/osmand/plus/LocationServiceHelperImpl.java index eaab9e3d06..5740e2b47b 100644 --- a/OsmAnd/src-gms/net/osmand/plus/LocationServiceHelperImpl.java +++ b/OsmAnd/src-gms/net/osmand/plus/LocationServiceHelperImpl.java @@ -13,7 +13,6 @@ import com.google.android.gms.location.LocationResult; import com.google.android.gms.location.LocationServices; import com.google.android.gms.tasks.OnSuccessListener; import com.google.android.gms.tasks.Task; -import com.google.android.gms.tasks.Tasks; import net.osmand.PlatformUtil; import net.osmand.plus.helpers.DayNightHelper; @@ -22,9 +21,6 @@ import net.osmand.plus.helpers.LocationServiceHelper; import org.apache.commons.logging.Log; import java.util.Collections; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; public class LocationServiceHelperImpl extends LocationServiceHelper {