Skip to content

Commit 3e6a34f

Browse files
committed
fix user-agent
1 parent 98d903f commit 3e6a34f

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ import kotlinx.coroutines.sync.withLock
156156
import java.lang.reflect.Field
157157
import java.util.Locale
158158

159-
private const val MAPBOX_NAVIGATION_USER_AGENT_BASE = "mapbox-navigation-android"
160159
private const val MAPBOX_NAVIGATION_TOKEN_EXCEPTION_ROUTER =
161160
"You need to provide an access token in NavigationOptions in order to use the default " +
162161
"Router."
@@ -554,7 +553,7 @@ class MapboxNavigation @VisibleForTesting internal constructor(
554553
MapboxMetricsReporter.init(
555554
navigationOptions.applicationContext,
556555
token,
557-
obtainUserAgent()
556+
USER_AGENT,
558557
)
559558
MapboxMetricsReporter.toggleLogging(navigationOptions.isDebugLoggingEnabled)
560559
}
@@ -2035,10 +2034,6 @@ class MapboxNavigation @VisibleForTesting internal constructor(
20352034
rerouteController?.interrupt()
20362035
}
20372036

2038-
private fun obtainUserAgent(): String {
2039-
return "$MAPBOX_NAVIGATION_USER_AGENT_BASE/${BuildConfig.MAPBOX_NAVIGATION_VERSION_NAME}"
2040-
}
2041-
20422037
private fun monitorNotificationActionButton(channel: ReceiveChannel<NotificationAction>) {
20432038
mainJobController.scope.monitorChannelWithException(
20442039
channel,

libnavigation-metrics/src/main/java/com/mapbox/navigation/metrics/MapboxMetricsReporter.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.mapbox.navigation.metrics
22

33
import android.content.Context
4+
import android.os.Handler
45
import com.google.gson.Gson
56
import com.mapbox.bindgen.Value
67
import com.mapbox.common.Event
@@ -66,7 +67,7 @@ object MapboxMetricsReporter : MetricsReporter {
6667
* Events priority. See [EventPriority]
6768
*/
6869
@Volatile
69-
var eventsPriority: EventPriority = EventPriority.QUEUED
70+
var eventsPriority: EventPriority = EventPriority.IMMEDIATE
7071

7172
/**
7273
* Initialize [EventsServiceInterface] and [TelemetryService] that need to send event to

0 commit comments

Comments
 (0)