From fca9925aa1e46014cc3111c1ad9fe8c75df65914 Mon Sep 17 00:00:00 2001 From: Alexander Sytnyk Date: Thu, 20 Jul 2017 18:39:33 +0300 Subject: [PATCH] Rename constants --- OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java | 4 ++-- OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java | 2 +- .../plus/views/mapwidgets/MapMarkersWidgetsFactory.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java b/OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java index aa8ae01897..1362aad3b9 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndLocationProvider.java @@ -48,8 +48,8 @@ public class OsmAndLocationProvider implements SensorEventListener { public static final String SIMULATED_PROVIDER = "OsmAnd"; - public static final long LOCATION_SHELF_LIFE = 1000 * 60 * 60; // 60 minutes - public static final long LOCATION_SHELF_LIFE_FOR_ICON = 1000 * 60 * 5; // 5 minutes + public static final long STALE_LOCATION_TIMEOUT = 1000 * 60 * 60; // 60 minutes + public static final long STALE_LOCATION_TIMEOUT_FOR_ICON = 1000 * 60 * 5; // 5 minutes public interface OsmAndLocationListener { void updateLocation(net.osmand.Location location); diff --git a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java index ae4ca49297..59f1758919 100644 --- a/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/PointLocationLayer.java @@ -76,7 +76,7 @@ public class PointLocationLayer extends OsmandMapLayer implements ContextMenuLay private boolean isLocationOutdated() { if (locationProvider.getLastKnownLocation() != null) { return System.currentTimeMillis() - locationProvider.getLastKnownLocation().getTime() > - OsmAndLocationProvider.LOCATION_SHELF_LIFE_FOR_ICON; + OsmAndLocationProvider.STALE_LOCATION_TIMEOUT_FOR_ICON; } return false; } diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java index 4be236c653..7a92dbf21f 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/MapMarkersWidgetsFactory.java @@ -194,7 +194,7 @@ public class MapMarkersWidgetsFactory { } else if (lastKnownPosition == null) { loc = null; } else { - if (System.currentTimeMillis() - lastKnownPosition.getTime() < OsmAndLocationProvider.LOCATION_SHELF_LIFE) { + if (System.currentTimeMillis() - lastKnownPosition.getTime() < OsmAndLocationProvider.STALE_LOCATION_TIMEOUT) { loc = new LatLon(lastKnownPosition.getLatitude(), lastKnownPosition.getLongitude()); } else { loc = null;