Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAVAND-1545: introduce long routes optimised mode #7564

Merged
merged 118 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from 110 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
fd309e9
don't keep routes from the same request
VysotskiVadim Oct 9, 2023
4f2a4b6
store empty list in direction routes
VysotskiVadim Oct 9, 2023
d50c9d9
more optimisations
VysotskiVadim Oct 10, 2023
5d1c39c
trying to clean geomerty caches
VysotskiVadim Oct 10, 2023
a673357
more logs
VysotskiVadim Oct 10, 2023
60cbb2e
more logs plus fixes
VysotskiVadim Oct 10, 2023
1822503
more fixes
VysotskiVadim Oct 10, 2023
05ea4f7
gor rid of caching
VysotskiVadim Oct 11, 2023
54c228b
more logs
VysotskiVadim Oct 12, 2023
50856a6
temporarry diable refresh
VysotskiVadim Oct 12, 2023
11186ba
optimised alternatives parsing
VysotskiVadim Oct 12, 2023
27dba5b
more logs
VysotskiVadim Oct 12, 2023
5fbda27
break triggerAlternativeRequest callback in fovour of memory optimisa…
VysotskiVadim Oct 12, 2023
c924422
added resource downloaded callback
VysotskiVadim Oct 13, 2023
ba2dd57
drop alternative routes before reroute and CA
VysotskiVadim Oct 13, 2023
8cd9c0d
more logs
VysotskiVadim Oct 13, 2023
93a19fb
intoroduces routes parsing queue
VysotskiVadim Oct 16, 2023
d5f69f3
parse routes in parallel to alternatives
VysotskiVadim Oct 16, 2023
1327af9
parse routes in paralles to alterantives
VysotskiVadim Oct 16, 2023
e987742
more tests
VysotskiVadim Oct 16, 2023
d312d15
use parsing queue
VysotskiVadim Oct 16, 2023
0acb82d
+todo
VysotskiVadim Oct 16, 2023
103c171
cleanup alterantives from the queue
VysotskiVadim Oct 16, 2023
0a3818e
fixed refresh
VysotskiVadim Oct 16, 2023
4cb5395
drop alterantives on new routes requests
VysotskiVadim Oct 16, 2023
e67f196
fixing unavoidable closures
VysotskiVadim Oct 18, 2023
a81d480
fixing tests
VysotskiVadim Oct 18, 2023
c73837e
fixing tests
VysotskiVadim Oct 18, 2023
c801d72
added navigaiton options
VysotskiVadim Oct 19, 2023
64502e9
getting rid of single static instance
VysotskiVadim Oct 19, 2023
47feab4
stopped using single instance of routes parsing queue
VysotskiVadim Oct 19, 2023
5161dbb
make prepare for parsing part of route parsing queue
VysotskiVadim Oct 19, 2023
d26b975
prepare for parsing via parsing queue
VysotskiVadim Oct 19, 2023
6271fac
cleanup routes on main thread
VysotskiVadim Oct 19, 2023
d4b858b
added alternatives parsing parameters
VysotskiVadim Oct 19, 2023
d0f959f
use config
VysotskiVadim Oct 19, 2023
ad9c621
implement parsing without optimisations
VysotskiVadim Oct 19, 2023
7626ea0
test not optimised parsing of routes in parallel route alternatives
VysotskiVadim Oct 19, 2023
7a53e9e
test for not optimised alterantives parsing
VysotskiVadim Oct 19, 2023
da93ab3
refactoring
VysotskiVadim Oct 19, 2023
c19d5b6
fixed route alternatives tests
VysotskiVadim Oct 19, 2023
2d1d05c
handle routes from different responnces
VysotskiVadim Oct 19, 2023
8e8084a
conditionally process immediate alternatives result
VysotskiVadim Oct 20, 2023
ce90e97
fixed unit which are using navigaiton routes
VysotskiVadim Oct 20, 2023
37690d1
fixed wrapper test
VysotskiVadim Oct 20, 2023
7748e01
test optimised routes
VysotskiVadim Oct 20, 2023
bdaab62
turn on route compatibility cache
VysotskiVadim Oct 20, 2023
6520511
disable route compatibility cache
VysotskiVadim Oct 20, 2023
c78f560
Revert "disable route compatibility cache"
VysotskiVadim Oct 20, 2023
5211ec3
disable compatibility cache
VysotskiVadim Oct 20, 2023
ffca9d7
enable again
VysotskiVadim Oct 20, 2023
32acaa5
got rid of response download listener
VysotskiVadim Oct 20, 2023
d1284e7
cleanup cache cleanup
VysotskiVadim Oct 20, 2023
c5a842f
cleanup
VysotskiVadim Oct 20, 2023
02fcebb
updated documentation
VysotskiVadim Oct 20, 2023
dce1f80
fixes
VysotskiVadim Oct 20, 2023
b3000c9
alternatives cleanup
VysotskiVadim Oct 20, 2023
9f0b14d
verify that not preparation for cleanup happened
VysotskiVadim Oct 20, 2023
00df572
cleanup
VysotskiVadim Oct 20, 2023
4feed43
identify correct size of byte buffer
VysotskiVadim Oct 20, 2023
26dddf9
cleanup
VysotskiVadim Oct 20, 2023
2b2cb3c
more checks
VysotskiVadim Oct 20, 2023
2a0fad1
added todo
VysotskiVadim Oct 20, 2023
e014141
don't keep whole route in response again
VysotskiVadim Oct 23, 2023
7c235bc
fixed compilation
VysotskiVadim Oct 23, 2023
d8c13ba
restructureed parameters
VysotskiVadim Oct 23, 2023
8679f8f
fixed tests
VysotskiVadim Oct 23, 2023
b918c5f
fixed compilation
VysotskiVadim Oct 23, 2023
4500bc3
toto
VysotskiVadim Oct 23, 2023
480796d
cleanu[
VysotskiVadim Oct 23, 2023
6c88eaa
don't optimise short routes
VysotskiVadim Oct 23, 2023
e8557c1
handle short routes parsing
VysotskiVadim Oct 23, 2023
6298892
added todos
VysotskiVadim Oct 23, 2023
a2eac5a
added logs to cache cleanup
VysotskiVadim Oct 23, 2023
829f794
got rid of redundant option
VysotskiVadim Oct 23, 2023
ba05c06
split route parsing manager in two parts
VysotskiVadim Oct 23, 2023
e447ca3
more cleanup
VysotskiVadim Oct 23, 2023
7abe104
don't keep whole route in telemetry
VysotskiVadim Oct 23, 2023
f88e1bd
one more test migrated
VysotskiVadim Oct 23, 2023
5a5d1ba
fixed routes directions waypoints tests
VysotskiVadim Oct 23, 2023
a134122
return old visibility
VysotskiVadim Oct 23, 2023
2c8753a
reorganised logs
VysotskiVadim Oct 23, 2023
d3d2558
fixed unit tests
VysotskiVadim Oct 23, 2023
b477241
pick the biggest response
VysotskiVadim Oct 23, 2023
457e9fa
fixed unit tests
VysotskiVadim Oct 23, 2023
08d6e5b
improved logging
VysotskiVadim Oct 24, 2023
d6054c1
adding documentation
VysotskiVadim Oct 24, 2023
0692e58
call route alternatives observer in case of optimised route with empt…
VysotskiVadim Oct 24, 2023
4d74646
added documentation for optimise navigation for long routes
VysotskiVadim Oct 24, 2023
21d2aee
stop mocking route options
VysotskiVadim Oct 24, 2023
34f1633
more checks in tests
VysotskiVadim Oct 24, 2023
debb40c
fixed unit tests
VysotskiVadim Oct 24, 2023
f2c6045
fixed routes previews
VysotskiVadim Oct 24, 2023
df0039b
support route preview
VysotskiVadim Oct 24, 2023
49352f1
rename
VysotskiVadim Oct 24, 2023
8d5e9b5
fixed documentation
VysotskiVadim Oct 24, 2023
76cfbbc
added changelog
VysotskiVadim Oct 24, 2023
70a972f
updated API
VysotskiVadim Oct 24, 2023
fd68f16
code style
VysotskiVadim Oct 24, 2023
c0fdd97
fixed code style
VysotskiVadim Oct 24, 2023
4d4f710
cleanup preview as well for preparation
VysotskiVadim Oct 25, 2023
043e438
added sanity test for long routes
VysotskiVadim Oct 25, 2023
04b729b
added test for preview
VysotskiVadim Oct 25, 2023
a5bd6af
test short routes
VysotskiVadim Oct 25, 2023
b34d8a2
added instrumentation tests
VysotskiVadim Oct 25, 2023
319786a
fixed intstrumentation tests
VysotskiVadim Oct 25, 2023
e9525d8
cleanup
VysotskiVadim Oct 26, 2023
00efa3e
prepare routes only if it makes sence
VysotskiVadim Oct 26, 2023
ad63f9a
updated documentation
VysotskiVadim Oct 26, 2023
c9c13a9
increased timeouts for old devices
VysotskiVadim Oct 27, 2023
8d4fbc4
increased timeout again
VysotskiVadim Oct 27, 2023
8af5d15
keep current leg index
VysotskiVadim Oct 27, 2023
20d2239
test leg indexes
VysotskiVadim Oct 27, 2023
0fda286
more location updates in route refresh tests
VysotskiVadim Oct 27, 2023
10238ef
more location updates
VysotskiVadim Oct 27, 2023
d20cfd4
record route refresh history
VysotskiVadim Oct 27, 2023
ba58649
update locations faster
VysotskiVadim Oct 27, 2023
816504c
resetting route refresh tests to the state of main
VysotskiVadim Oct 27, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/unreleased/features/7564.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Introduced `NavigationOptions#longRoutesOptimisationOptions` which changes the Nav SDK behavior so that it's able to handle heavy routes objects. See documentation of `OptimiseNavigationForLongRoutes` to learn more about it.
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ class EvOfflineTest : BaseCoreNoCleanUpTest() {
profile = DirectionsCriteria.PROFILE_DRIVING_TRAFFIC,
jsonResponse = offlineRoutes.first().directionsResponse
.toBuilder()
.routes(offlineRoutes.map { it.directionsRoute })
.uuid("route-similar-to-$primaryRouteResponseUUID")
.build()
.toJson(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
@file:OptIn(ExperimentalPreviewMapboxNavigationAPI::class)

package com.mapbox.navigation.instrumentation_tests.core

import android.location.Location
import com.mapbox.api.directions.v5.DirectionsCriteria
import com.mapbox.api.directions.v5.models.RouteOptions
import com.mapbox.navigation.base.ExperimentalPreviewMapboxNavigationAPI
import com.mapbox.navigation.base.extensions.applyDefaultNavigationOptions
import com.mapbox.navigation.base.options.LongRoutesOptimisationOptions
import com.mapbox.navigation.core.directions.session.RoutesExtra
import com.mapbox.navigation.core.internal.extensions.flowRouteProgress
import com.mapbox.navigation.instrumentation_tests.R
import com.mapbox.navigation.instrumentation_tests.utils.DelayedResponseModifier
import com.mapbox.navigation.instrumentation_tests.utils.http.MockDirectionsRequestHandler
import com.mapbox.navigation.instrumentation_tests.utils.location.stayOnPosition
import com.mapbox.navigation.instrumentation_tests.utils.readRawFileText
import com.mapbox.navigation.instrumentation_tests.utils.routes.RoutesProvider
import com.mapbox.navigation.instrumentation_tests.utils.withMapboxNavigation
import com.mapbox.navigation.testing.ui.BaseCoreNoCleanUpTest
import com.mapbox.navigation.testing.ui.utils.coroutines.getSuccessfulResultOrThrowException
import com.mapbox.navigation.testing.ui.utils.coroutines.requestRoutes
import com.mapbox.navigation.testing.ui.utils.coroutines.routesPreviewUpdates
import com.mapbox.navigation.testing.ui.utils.coroutines.routesUpdates
import com.mapbox.navigation.testing.ui.utils.coroutines.sdkTest
import com.mapbox.navigation.testing.ui.utils.coroutines.setNavigationRoutesAsync
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
import org.junit.Assert.assertEquals
import org.junit.Test

// old devices parse long routes very slowly
private const val EXTENDED_TIMEOUT_FOR_SLOW_PARSING = 120_000L

class LongRoutesSanityTest : BaseCoreNoCleanUpTest() {

override fun setupMockLocation(): Location {
Expand All @@ -27,6 +44,133 @@ class LongRoutesSanityTest : BaseCoreNoCleanUpTest() {

@Test
fun requestAndSetLongRouteWithoutOnboardTiles() = sdkTest(timeout = 120_000) {
val routeOptions = longRouteOptions()
val handler = MockDirectionsRequestHandler(
profile = DirectionsCriteria.PROFILE_DRIVING_TRAFFIC,
lazyJsonResponse = { readRawFileText(context, R.raw.long_route_7k) },
expectedCoordinates = routeOptions.coordinatesList()
).apply {
// It takes time for Direction API to calculate a long route
jsonResponseModifier = DelayedResponseModifier(12_000)
}
mockWebServerRule.requestHandlers.add(handler)
withMapboxNavigation { navigation ->
val routes = navigation
.requestRoutes(routeOptions)
.getSuccessfulResultOrThrowException().routes
navigation.setNavigationRoutesAsync(routes)
}
}

@Test
fun requestNewRoutesWhileLongRoutesAreSet() = sdkTest(EXTENDED_TIMEOUT_FOR_SLOW_PARSING) {
val longRoutesOptions = setupLongRoutes()
val shortRoutesOptions = setupShortRoutes()
withMapboxNavigation(
longRoutesOptimisationOptions =
LongRoutesOptimisationOptions.OptimiseNavigationForLongRoutes(
responseToParseSizeBytes = 5.megabytesInBytes()
)
) { navigation ->
navigation.setNavigationRoutesAsync(
navigation
.requestRoutes(longRoutesOptions)
.getSuccessfulResultOrThrowException().routes
)
assertEquals(2, navigation.getNavigationRoutes().size)

val shortRoutes = navigation.requestRoutes(shortRoutesOptions)
assertEquals(2, navigation.getNavigationRoutes().size)

val newRoutes = navigation.requestRoutes(longRoutesOptions)
.getSuccessfulResultOrThrowException()
assertEquals(1, navigation.getNavigationRoutes().size)
}
}

@Test
fun requestNewRoutesWhileLongRoutesArePreviewed() = sdkTest(EXTENDED_TIMEOUT_FOR_SLOW_PARSING) {
val longRoutesOptions = setupLongRoutes()
val shortRoutesOptions = setupShortRoutes()
withMapboxNavigation(
longRoutesOptimisationOptions =
LongRoutesOptimisationOptions.OptimiseNavigationForLongRoutes(
responseToParseSizeBytes = 5.megabytesInBytes()
)
) { navigation ->
navigation.setRoutesPreview(
navigation
.requestRoutes(longRoutesOptions)
.getSuccessfulResultOrThrowException().routes
)

assertEquals(
2,
navigation.routesPreviewUpdates()
.map { it.routesPreview }
.filterNotNull()
.first()
.routesList.size
)

val shortRoutes = navigation.requestRoutes(shortRoutesOptions)
assertEquals(2, navigation.getRoutesPreview()?.routesList?.size)

val newLongRoutes = navigation.requestRoutes(longRoutesOptions)
.getSuccessfulResultOrThrowException()
assertEquals(1, navigation.getRoutesPreview()?.routesList?.size)
}
}

@Test
fun rerouteOnLongRoute() = sdkTest(EXTENDED_TIMEOUT_FOR_SLOW_PARSING) {
val longRoutesOptions = setupLongRoutes()
val longRoutesRerouteOptions = setupLongRoutesReroute()
withMapboxNavigation(
longRoutesOptimisationOptions =
LongRoutesOptimisationOptions.OptimiseNavigationForLongRoutes(
responseToParseSizeBytes = 5.megabytesInBytes()
)
) { navigation ->
navigation.setNavigationRoutesAsync(
navigation
.requestRoutes(longRoutesOptions)
.getSuccessfulResultOrThrowException().routes
)
assertEquals(2, navigation.getNavigationRoutes().size)

val rerouteOrigin = longRoutesRerouteOptions.coordinatesList().first()
stayOnPosition(
latitude = rerouteOrigin.latitude(),
longitude = rerouteOrigin.longitude(),
bearing = 190.0f
) {
navigation.startTripSession()
navigation.flowRouteProgress().first()
val droppingAlternatives = navigation.routesUpdates().first {
it.reason == RoutesExtra.ROUTES_UPDATE_REASON_ALTERNATIVE
}
assertEquals(1, droppingAlternatives.navigationRoutes.size)
val reroute = navigation.routesUpdates().first {
it.reason == RoutesExtra.ROUTES_UPDATE_REASON_REROUTE
}
assertEquals(2, reroute.navigationRoutes.size)
}
}
}

private fun setupLongRoutes(): RouteOptions {
val routeOptions = longRouteOptions()
val handler = MockDirectionsRequestHandler(
profile = routeOptions.profile(),
lazyJsonResponse = { readRawFileText(context, R.raw.long_route_7k) },
expectedCoordinates = routeOptions.coordinatesList()
)
mockWebServerRule.requestHandlers.add(handler)
return routeOptions
}

private fun longRouteOptions(): RouteOptions {
val routeOptions = RouteOptions.builder()
.baseUrl(mockWebServerRule.baseUrl) // comment to use real Directions API
.applyDefaultNavigationOptions()
Expand All @@ -41,20 +185,45 @@ class LongRoutesSanityTest : BaseCoreNoCleanUpTest() {
.alternatives(true)
.enableRefresh(true)
.build()
return routeOptions
}

private fun setupLongRoutesReroute(): RouteOptions {
val routeOptions = longRouteRerouteOptions()
val handler = MockDirectionsRequestHandler(
profile = DirectionsCriteria.PROFILE_DRIVING_TRAFFIC,
lazyJsonResponse = { readRawFileText(context, R.raw.long_route_7k) },
profile = routeOptions.profile(),
lazyJsonResponse = { readRawFileText(context, R.raw.long_route_7k_reroute) },
expectedCoordinates = routeOptions.coordinatesList()
).apply {
// It takes time for Direction API to calculate a long route
jsonResponseModifier = DelayedResponseModifier(12_000)
}
)
mockWebServerRule.requestHandlers.add(handler)
withMapboxNavigation { navigation ->
val routes = navigation
.requestRoutes(routeOptions)
.getSuccessfulResultOrThrowException().routes
navigation.setNavigationRoutesAsync(routes)
}
return routeOptions
}

private fun longRouteRerouteOptions(): RouteOptions {
val routeOptions = RouteOptions.builder()
.baseUrl(mockWebServerRule.baseUrl) // comment to use real Directions API
.applyDefaultNavigationOptions()
.coordinates(
"4.899038,52.373577" +
";5.359980783143584,43.280050656855906" +
";11.571179644010442,48.145540095763664" +
";13.394784408007155,52.51274942160785" +
";-9.143239539655042,38.70880224984026" +
";9.21595128801522,45.4694220491258"
)
.alternatives(true)
.enableRefresh(true)
.build()
return routeOptions
}

private fun setupShortRoutes(): RouteOptions {
val shortRoute = RoutesProvider.dc_very_short(context)
mockWebServerRule.requestHandlers.addAll(shortRoute.mockRequestHandlers)
return RouteOptions.builder().applyDefaultNavigationOptions()
.coordinatesList(shortRoute.routeWaypoints)
.build()
}
}

private fun Int.megabytesInBytes() = this * 1024 * 1024
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ import com.mapbox.navigation.core.history.model.HistoryEventGetStatus
import com.mapbox.navigation.core.history.model.HistoryEventPushHistoryRecord
import com.mapbox.navigation.core.history.model.HistoryEventSetRoute
import com.mapbox.navigation.core.history.model.HistoryEventUpdateLocation
import com.mapbox.navigation.instrumentation_tests.activity.EmptyTestActivity
import com.mapbox.navigation.instrumentation_tests.utils.idling.RouteProgressStateIdlingResource
import com.mapbox.navigation.instrumentation_tests.utils.location.MockLocationReplayerRule
import com.mapbox.navigation.instrumentation_tests.utils.routes.MockRoute
import com.mapbox.navigation.instrumentation_tests.utils.routes.RoutesProvider
import com.mapbox.navigation.testing.ui.BaseTest
import com.mapbox.navigation.testing.ui.BaseCoreNoCleanUpTest
import com.mapbox.navigation.testing.ui.utils.MapboxNavigationRule
import com.mapbox.navigation.testing.ui.utils.coroutines.sdkTest
import com.mapbox.navigation.testing.ui.utils.coroutines.stopRecording
Expand All @@ -45,7 +44,7 @@ import org.junit.Test
import java.io.File
import java.io.InputStream

class MapboxHistoryTest : BaseTest<EmptyTestActivity>(EmptyTestActivity::class.java) {
class MapboxHistoryTest : BaseCoreNoCleanUpTest() {

@get:Rule
val mapboxNavigationRule = MapboxNavigationRule()
Expand All @@ -64,7 +63,7 @@ class MapboxHistoryTest : BaseTest<EmptyTestActivity>(EmptyTestActivity::class.j

@Before
fun createTestDirectory() {
testDirectory = File(activity.filesDir, "mapbox_history_test_directory")
testDirectory = File(context.filesDir, "mapbox_history_test_directory")
.also { it.mkdirs() }
}

Expand All @@ -79,8 +78,8 @@ class MapboxHistoryTest : BaseTest<EmptyTestActivity>(EmptyTestActivity::class.j

runOnMainSync {
mapboxNavigation = MapboxNavigationProvider.create(
NavigationOptions.Builder(activity)
.accessToken(getMapboxAccessTokenFromResources(activity))
NavigationOptions.Builder(context)
.accessToken(getMapboxAccessTokenFromResources(context))
.historyRecorderOptions(
HistoryRecorderOptions.Builder()
.build()
Expand All @@ -97,13 +96,13 @@ class MapboxHistoryTest : BaseTest<EmptyTestActivity>(EmptyTestActivity::class.j
@Test
fun verify_history_files_are_recorded_and_readable() {
// prepare
val mockRoute = RoutesProvider.dc_very_short(activity)
val mockRoute = RoutesProvider.dc_very_short(context)
mockWebServerRule.requestHandlers.addAll(mockRoute.mockRequestHandlers)
routeCompleteIdlingResource.register()

val routeOptions = RouteOptions.builder()
.applyDefaultNavigationOptions()
.applyLanguageAndVoiceUnitOptions(activity)
.applyLanguageAndVoiceUnitOptions(context)
.baseUrl(mockWebServerRule.baseUrl)
.coordinatesList(mockRoute.routeWaypoints).build()

Expand Down Expand Up @@ -154,13 +153,13 @@ class MapboxHistoryTest : BaseTest<EmptyTestActivity>(EmptyTestActivity::class.j
@Test
fun verify_history_files_are_recorded_and_readable_with_silent_waypoints() {
// prepare
val mockRoute = RoutesProvider.dc_very_short_two_legs_with_silent_waypoint(activity)
val mockRoute = RoutesProvider.dc_very_short_two_legs_with_silent_waypoint(context)
mockWebServerRule.requestHandlers.addAll(mockRoute.mockRequestHandlers)
routeCompleteIdlingResource.register()

val routeOptions = RouteOptions.builder()
.applyDefaultNavigationOptions()
.applyLanguageAndVoiceUnitOptions(activity)
.applyLanguageAndVoiceUnitOptions(context)
.baseUrl(mockWebServerRule.baseUrl)
.coordinatesList(mockRoute.routeWaypoints)
.waypointIndicesList(listOf(0, 2))
Expand Down Expand Up @@ -353,7 +352,7 @@ class MapboxHistoryTest : BaseTest<EmptyTestActivity>(EmptyTestActivity::class.j
private fun historyReaderFromAssetFile(
name: String
): MapboxHistoryReader {
val inputStream: InputStream = activity.assets.open(name)
val inputStream: InputStream = context.assets.open(name)
val outputFile = File(testDirectory, name)
outputFile.outputStream().use { fileOut ->
inputStream.copyTo(fileOut)
Expand Down
Loading