summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Li <kevin.li@mapbox.com>2018-11-29 18:03:33 +0800
committerGitHub <noreply@github.com>2018-11-29 18:03:33 +0800
commit217acb894893f64c35a876f573cc616321cfeafd (patch)
treea374a13a0b7a316f630d6f02f00ebb9459e3d8fc
parent4146699c389be9a26c97e023aa21396cb6308a40 (diff)
downloadqtlocation-mapboxgl-217acb894893f64c35a876f573cc616321cfeafd.tar.gz
Send turnstile event while create MapSnapshotter instance (#13475)
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java
index 93b7dd9260..411f44f284 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java
@@ -17,6 +17,8 @@ import android.util.DisplayMetrics;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
+
+import com.mapbox.mapboxsdk.Mapbox;
import com.mapbox.mapboxsdk.R;
import com.mapbox.mapboxsdk.attribution.AttributionLayout;
import com.mapbox.mapboxsdk.attribution.AttributionMeasure;
@@ -25,6 +27,7 @@ import com.mapbox.mapboxsdk.camera.CameraPosition;
import com.mapbox.mapboxsdk.constants.Style;
import com.mapbox.mapboxsdk.geometry.LatLngBounds;
import com.mapbox.mapboxsdk.log.Logger;
+import com.mapbox.mapboxsdk.maps.TelemetryDefinition;
import com.mapbox.mapboxsdk.storage.FileSource;
import com.mapbox.mapboxsdk.utils.ThreadUtils;
@@ -251,6 +254,10 @@ public class MapSnapshotter {
public MapSnapshotter(@NonNull Context context, @NonNull Options options) {
checkThread();
this.context = context.getApplicationContext();
+ TelemetryDefinition telemetry = Mapbox.getTelemetry();
+ if (telemetry != null) {
+ telemetry.onAppUserTurnstileEvent();
+ }
FileSource fileSource = FileSource.getInstance(context);
String programCacheDir = FileSource.getInternalCachePath(context);