mapbox-navigation-android
mapbox-navigation-android copied to clipboard
MapboxNavigation doesn't fetch a new route for offRoute and new `RerouteController`
I issue: Incorrect reroute controller checks in MapboxNavigation
fun setRerouteController for NavigationRerouteController is not working correctly. It checks if a new rerouteController is fetching route, but must check legacy.
https://github.com/mapbox/mapbox-navigation-android/blob/09cd530425a2ec891e39f9d2fa0ff6a729cc1af9/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt#L1131-L1139
there's working right https://github.com/mapbox/mapbox-navigation-android/blob/09cd530425a2ec891e39f9d2fa0ff6a729cc1af9/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt#L1116-L1124
II issue: If a current reroute controller is disabled for some time a new route might not be fetched at all
The only condition that is checked if the current rerouteControler is fetching route, but actually if arerouteController does not exist or it failed the SDK doesn't try to fetch a new route. Must be checked offRoute state as well
https://github.com/mapbox/mapbox-navigation-android/blob/09cd530425a2ec891e39f9d2fa0ff6a729cc1af9/libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt#L1120
The first issue is resolved via https://github.com/mapbox/mapbox-navigation-android/pull/5950.