-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix empty profile in feedback events
- Loading branch information
1 parent
4c14629
commit e182041
Showing
9 changed files
with
210 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...-core/src/main/java/com/mapbox/navigation/core/telemetry/events/MetricsDirectionsRoute.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.mapbox.navigation.core.telemetry.events | ||
|
||
import com.mapbox.api.directions.v5.models.DirectionsRoute | ||
import com.mapbox.navigation.core.telemetry.obtainStepCount | ||
|
||
internal data class MetricsDirectionsRoute( | ||
val stepCount: Int, | ||
val distance: Int, | ||
val duration: Int, | ||
val requestIdentifier: String?, | ||
val geometry: String?, | ||
) { | ||
|
||
constructor(directionsRoute: DirectionsRoute?) : this( | ||
obtainStepCount(directionsRoute), | ||
distance = directionsRoute?.distance()?.toInt() ?: 0, | ||
duration = directionsRoute?.duration()?.toInt() ?: 0, | ||
directionsRoute?.requestUuid(), | ||
directionsRoute?.geometry(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.