Skip to content

Commit dacb11a

Browse files
author
Łukasz Paczos
committed
block until deprecated MapboxNavigation#resetTripSession() finishes
1 parent 79e3cb2 commit dacb11a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

libnavigation-core/src/main/java/com/mapbox/navigation/core/MapboxNavigation.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ import kotlinx.coroutines.cancel
143143
import kotlinx.coroutines.channels.Channel
144144
import kotlinx.coroutines.channels.ReceiveChannel
145145
import kotlinx.coroutines.launch
146+
import kotlinx.coroutines.runBlocking
146147
import kotlinx.coroutines.sync.Mutex
147148
import kotlinx.coroutines.sync.withLock
148149
import java.lang.reflect.Field
@@ -647,8 +648,14 @@ class MapboxNavigation @VisibleForTesting internal constructor(
647648
*/
648649
@Deprecated(message = "use a function withe the callback instead")
649650
fun resetTripSession() {
650-
resetTripSession {
651-
// no-op
651+
runBlocking {
652+
logD(LOG_CATEGORY) {
653+
"Resetting trip session"
654+
}
655+
navigator.resetRideSession()
656+
logI(LOG_CATEGORY) {
657+
"Trip session reset"
658+
}
652659
}
653660
}
654661

0 commit comments

Comments
 (0)