upgraded telem version (#11338)

* upgraded telem version

* use telem method instead of Okhttp

* use telem util in test
This commit is contained in:
Cameron Mace
2018-02-28 14:38:26 -05:00
committed by GitHub
parent b74930c5fc
commit 20c79d9e71
3 changed files with 6 additions and 7 deletions

View File

@@ -1,6 +1,5 @@
package com.mapbox.mapboxsdk.http;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.os.Build;
@@ -27,9 +26,10 @@ import okhttp3.HttpUrl;
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;
@@ -204,7 +204,7 @@ class HTTPRequest implements Callback {
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,