@@ -6,6 +6,7 @@ import com.mapbox.android.core.location.LocationEngineProvider
66import com.mapbox.android.core.location.LocationEngineRequest
77import com.mapbox.navigation.base.TimeFormat
88import com.mapbox.navigation.base.formatter.DistanceFormatterOptions
9+ import com.mapbox.navigation.base.internal.CopilotOptions
910import com.mapbox.navigation.base.route.RouteAlternativesOptions
1011import com.mapbox.navigation.base.route.RouteRefreshOptions
1112
@@ -61,6 +62,7 @@ class NavigationOptions private constructor(
6162 val historyRecorderOptions : HistoryRecorderOptions ,
6263 val eventsAppMetadata : EventsAppMetadata ? ,
6364 val enableSensors : Boolean ,
65+ internal val copilotOptions : CopilotOptions ,
6466) {
6567
6668 /* *
@@ -84,6 +86,7 @@ class NavigationOptions private constructor(
8486 historyRecorderOptions(historyRecorderOptions)
8587 eventsAppMetadata(eventsAppMetadata)
8688 enableSensors(enableSensors)
89+ copilotOptions(copilotOptions)
8790 }
8891
8992 /* *
@@ -113,6 +116,7 @@ class NavigationOptions private constructor(
113116 if (historyRecorderOptions != other.historyRecorderOptions) return false
114117 if (eventsAppMetadata != other.eventsAppMetadata) return false
115118 if (enableSensors != other.enableSensors) return false
119+ if (copilotOptions != other.copilotOptions) return false
116120
117121 return true
118122 }
@@ -139,6 +143,7 @@ class NavigationOptions private constructor(
139143 result = 31 * result + historyRecorderOptions.hashCode()
140144 result = 31 * result + eventsAppMetadata.hashCode()
141145 result = 31 * result + enableSensors.hashCode()
146+ result = 31 * result + copilotOptions.hashCode()
142147 return result
143148 }
144149
@@ -164,7 +169,8 @@ class NavigationOptions private constructor(
164169 " incidentsOptions=$incidentsOptions , " +
165170 " historyRecorderOptions=$historyRecorderOptions , " +
166171 " eventsAppMetadata=$eventsAppMetadata , " +
167- " enableSensors=$enableSensors " +
172+ " enableSensors=$enableSensors , " +
173+ " copilotOptions=$copilotOptions " +
168174 " )"
169175 }
170176
@@ -199,6 +205,7 @@ class NavigationOptions private constructor(
199205 HistoryRecorderOptions .Builder ().build()
200206 private var eventsAppMetadata: EventsAppMetadata ? = null
201207 private var enableSensors: Boolean = false
208+ private var copilotOptions: CopilotOptions = CopilotOptions .Builder ().build()
202209
203210 /* *
204211 * Defines [Mapbox Access Token](https://docs.mapbox.com/help/glossary/access-token/)
@@ -305,6 +312,12 @@ class NavigationOptions private constructor(
305312 fun enableSensors (value : Boolean ): Builder =
306313 apply { this .enableSensors = value }
307314
315+ /* *
316+ * Defines configuration for Copilot
317+ */
318+ internal fun copilotOptions (copilotOptions : CopilotOptions ): Builder =
319+ apply { this .copilotOptions = copilotOptions }
320+
308321 /* *
309322 * Build a new instance of [NavigationOptions]
310323 * @return NavigationOptions
@@ -329,7 +342,8 @@ class NavigationOptions private constructor(
329342 incidentsOptions = incidentsOptions,
330343 historyRecorderOptions = historyRecorderOptions,
331344 eventsAppMetadata = eventsAppMetadata,
332- enableSensors = enableSensors
345+ enableSensors = enableSensors,
346+ copilotOptions = copilotOptions,
333347 )
334348 }
335349 }
0 commit comments