File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
libnavigation-core/src/main/java/com/mapbox/navigation/core Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ import kotlinx.coroutines.cancel
143143import kotlinx.coroutines.channels.Channel
144144import kotlinx.coroutines.channels.ReceiveChannel
145145import kotlinx.coroutines.launch
146+ import kotlinx.coroutines.runBlocking
146147import kotlinx.coroutines.sync.Mutex
147148import kotlinx.coroutines.sync.withLock
148149import java.lang.reflect.Field
@@ -645,10 +646,18 @@ class MapboxNavigation @VisibleForTesting internal constructor(
645646 * navigation simulation, or before resetting location to not real (simulated)
646647 * position without recreation of [MapboxNavigation].
647648 */
648- @Deprecated(message = " use a function withe the callback instead" )
649+ @Deprecated(message = " use the overload with the callback instead" )
649650 fun resetTripSession () {
650- resetTripSession {
651- // no-op
651+ // using a blocking function to keep parity with the original implementation so that
652+ // Nav Native is fully done with the reset when this function returns
653+ runBlocking {
654+ logD(LOG_CATEGORY ) {
655+ " Resetting trip session"
656+ }
657+ navigator.resetRideSession()
658+ logI(LOG_CATEGORY ) {
659+ " Trip session reset"
660+ }
652661 }
653662 }
654663
You can’t perform that action at this time.
0 commit comments