From 376a53e3c64e21ef550ac149eb112dd6d8fbb917 Mon Sep 17 00:00:00 2001 From: danesfeder Date: Tue, 17 Apr 2018 09:17:22 -0400 Subject: [PATCH 1/2] Remove invalid Location update check --- .../plugins/locationlayer/LocationLayerAnimator.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java b/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java index eb68c97fb..56e78efde 100644 --- a/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java +++ b/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java @@ -60,10 +60,6 @@ void feedNewLocation(@NonNull Location newLocation, @NonNull CameraPosition curr locationUpdateTimestamp = SystemClock.elapsedRealtime(); } - if (invalidUpdateInterval()) { - return; - } - LatLng previousLayerLatLng = getPreviousLayerLatLng(); float previousLayerBearing = getPreviousLayerGpsBearing(); LatLng previousCameraLatLng = currentCameraPosition.target; @@ -185,11 +181,6 @@ void cancelAllAnimations() { cancelCameraCompassAnimations(); } - private boolean invalidUpdateInterval() { - return locationUpdateTimestamp > 0 - && (SystemClock.elapsedRealtime() - locationUpdateTimestamp) < ONE_SECOND; - } - private LatLng getPreviousLayerLatLng() { LatLng previousLatLng; if (layerLatLngAnimator != null) { From 7e69633b836a33dab30fc56f56f14eb23e43ab14 Mon Sep 17 00:00:00 2001 From: danesfeder Date: Tue, 17 Apr 2018 09:51:42 -0400 Subject: [PATCH 2/2] Remove unused constant --- .../mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java b/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java index 56e78efde..7aa5c7a5b 100644 --- a/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java +++ b/plugin-locationlayer/src/main/java/com/mapbox/mapboxsdk/plugins/locationlayer/LocationLayerAnimator.java @@ -20,8 +20,6 @@ final class LocationLayerAnimator { - private static final int ONE_SECOND = 1000; - private final List layerListeners = new ArrayList<>(); private final List cameraListeners = new ArrayList<>();