diff options
author | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-07-24 00:20:02 +0200 |
---|---|---|
committer | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-07-26 19:47:11 +0200 |
commit | 94ad8e2ff8928bec316dfcc9790db7b522673d3e (patch) | |
tree | 1a7b0c7fb42aa6dba049c5d42305f6d5c4ac93b7 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java | |
parent | 5fcd6e38a9e9ca755d997b83f007f8a2f435cf45 (diff) | |
download | qtlocation-mapboxgl-94ad8e2ff8928bec316dfcc9790db7b522673d3e.tar.gz |
[android] using @Keep annotation across the project with the help of lint checks
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java | 13 |
1 files changed, 13 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 a2c7ed5dfd..2aea565d8b 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 @@ -7,6 +7,7 @@ import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.PointF; import android.os.Handler; +import android.support.annotation.Keep; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.UiThread; @@ -71,6 +72,7 @@ public class MapSnapshotter { private static final int LOGO_MARGIN_DP = 4; // Holds the pointer to JNI NativeMapView + @Keep private long nativePtr = 0; private final Context context; @@ -255,6 +257,7 @@ public class MapSnapshotter { * @param width the width * @param height the height */ + @Keep public native void setSize(int width, int height); /** @@ -262,6 +265,7 @@ public class MapSnapshotter { * * @param cameraPosition the camera position */ + @Keep public native void setCameraPosition(CameraPosition cameraPosition); /** @@ -269,6 +273,7 @@ public class MapSnapshotter { * * @param region the region */ + @Keep public native void setRegion(LatLngBounds region); /** @@ -276,6 +281,7 @@ public class MapSnapshotter { * * @param styleUrl the style url */ + @Keep public native void setStyleUrl(String styleUrl); /** @@ -283,6 +289,7 @@ public class MapSnapshotter { * * @param styleJson the style json */ + @Keep public native void setStyleJson(String styleJson); /** @@ -446,6 +453,7 @@ public class MapSnapshotter { * * @param snapshot the generated snapshot */ + @Keep protected void onSnapshotReady(final MapSnapshot snapshot) { new Handler().post(new Runnable() { @Override @@ -465,6 +473,7 @@ public class MapSnapshotter { * * @param reason the exception string */ + @Keep protected void onSnapshotFailed(String reason) { if (errorHandler != null) { errorHandler.onError(reason); @@ -481,17 +490,21 @@ public class MapSnapshotter { errorHandler = null; } + @Keep protected native void nativeInitialize(MapSnapshotter mapSnapshotter, FileSource fileSource, float pixelRatio, int width, int height, String styleUrl, String styleJson, LatLngBounds region, CameraPosition position, boolean showLogo, String programCacheDir); + @Keep protected native void nativeStart(); + @Keep protected native void nativeCancel(); @Override + @Keep protected native void finalize() throws Throwable; private class Logo { |