From 1f0f21e2d858c43df219a2ecc31a8a149c9397be Mon Sep 17 00:00:00 2001 From: Cameron Mace Date: Thu, 6 Jul 2017 18:03:35 -0400 Subject: [PATCH] use options reroute time instead of constant --- .../mapbox/services/android/navigation/v5/NavigationEngine.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/NavigationEngine.java b/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/NavigationEngine.java index 49602404bc6..21196e69cb5 100644 --- a/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/NavigationEngine.java +++ b/navigation/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/NavigationEngine.java @@ -131,7 +131,7 @@ private void notifyOffRouteChange(boolean isUserOffRoute, Location location) { if (isUserOffRoute) { if (location.getTime() > timeIntervalSinceLastOffRoute - + TimeUnit.SECONDS.toMillis(NavigationConstants.SECONDS_BEFORE_REROUTE)) { + + TimeUnit.SECONDS.toMillis(options.getSecondsBeforeReroute())) { for (OffRouteListener offRouteListener : offRouteListeners) { offRouteListener.userOffRoute(location); }