Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

upgraded telem version #11338

Merged
merged 3 commits into from
Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.mapbox.mapboxsdk.http;


import android.content.Context;
import android.content.pm.PackageInfo;
import android.os.Build;
Expand All @@ -27,9 +26,10 @@
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.internal.Util;
import timber.log.Timber;

import static com.mapbox.services.android.telemetry.utils.TelemetryUtils.toHumanReadableAscii;

import static android.util.Log.DEBUG;
import static android.util.Log.INFO;
import static android.util.Log.WARN;
Expand Down Expand Up @@ -204,7 +204,7 @@ private void logFailure(int type, String errorMessage, String requestUrl) {

private String getUserAgent() {
if (USER_AGENT_STRING == null) {
return USER_AGENT_STRING = Util.toHumanReadableAscii(
return USER_AGENT_STRING = toHumanReadableAscii(
String.format("%s %s (%s) Android/%s (%s)",
getApplicationIdentifier(),
BuildConfig.MAPBOX_VERSION_STRING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import org.junit.Test;

import okhttp3.internal.Util;

import static com.mapbox.services.android.telemetry.utils.TelemetryUtils.toHumanReadableAscii;
import static junit.framework.Assert.assertEquals;

public class HttpTransportTest {
Expand All @@ -15,6 +14,6 @@ public void testNonAsciiUserAgent() {
final String asciiVersion = "Sveriges Fj?ll/1.0/1 MapboxEventsAndroid/4.0.0-SNAPSHOT";

assertEquals("asciiVersion and swedishUserAgent should match", asciiVersion,
Util.toHumanReadableAscii(swedishUserAgent));
toHumanReadableAscii(swedishUserAgent));
}
}
2 changes: 1 addition & 1 deletion platform/android/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ext {
versionCode = 11
versionName = "5.0.0"

mapboxServicesVersion = "2.2.9"
mapboxServicesVersion = "2.2.10"
supportLibVersion = "25.4.0"
espressoVersion = '3.0.1'
testRunnerVersion = '1.0.1'
Expand Down