diff options
author | Tobrun Van Nuland <tobrun.van.nuland@gmail.com> | 2017-08-07 08:14:32 +0200 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2017-08-07 10:17:33 +0200 |
commit | 7eba031ae25a8e9256e70c3fd9271ce31aa836a5 (patch) | |
tree | d6b7b5855c177ab7ba0fc5cf7fd987809ea68959 | |
parent | 466728b441308de4bb0579d8b871c587607c76ae (diff) | |
download | qtlocation-mapboxgl-7eba031ae25a8e9256e70c3fd9271ce31aa836a5.tar.gz |
[android] - annotate MapboxMap with UiThread
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java | 108 |
1 files changed, 1 insertions, 107 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java index cf949dbcdc..d99b5646dd 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java @@ -59,6 +59,7 @@ import timber.log.Timber; * Note: Similar to a View object, a MapboxMap should only be read and modified from the main thread. * </p> */ +@UiThread public final class MapboxMap { private final NativeMapView nativeMapView; @@ -210,7 +211,6 @@ public final class MapboxMap { * * @return Duration in milliseconds */ - @UiThread public long getTransitionDuration() { return nativeMapView.getTransitionDuration(); } @@ -220,7 +220,6 @@ public final class MapboxMap { * * @param durationMs Duration in milliseconds */ - @UiThread public void setTransitionDuration(long durationMs) { nativeMapView.setTransitionDuration(durationMs); } @@ -233,7 +232,6 @@ public final class MapboxMap { * * @return Delay in milliseconds */ - @UiThread public long getTransitionDelay() { return nativeMapView.getTransitionDelay(); } @@ -243,7 +241,6 @@ public final class MapboxMap { * * @param delayMs Delay in milliseconds */ - @UiThread public void setTransitionDelay(long delayMs) { nativeMapView.setTransitionDelay(delayMs); } @@ -263,7 +260,6 @@ public final class MapboxMap { * * @param enable true to enable */ - @UiThread public void setPrefetchesTiles(boolean enable) { nativeMapView.setPrefetchesTiles(enable); } @@ -274,7 +270,6 @@ public final class MapboxMap { * @return true if enabled * @see MapboxMap#setPrefetchesTiles(boolean) */ - @UiThread public boolean getPrefetchesTiles() { return nativeMapView.getPrefetchesTiles(); } @@ -284,7 +279,6 @@ public final class MapboxMap { * * @return all the layers in the current style */ - @UiThread public List<Layer> getLayers() { return nativeMapView.getLayers(); } @@ -296,7 +290,6 @@ public final class MapboxMap { * @return the layer, if present in the style */ @Nullable - @UiThread public Layer getLayer(@NonNull String layerId) { return nativeMapView.getLayer(layerId); } @@ -309,7 +302,6 @@ public final class MapboxMap { * @return the casted Layer, null if another type */ @Nullable - @UiThread public <T extends Layer> T getLayerAs(@NonNull String layerId) { try { // noinspection unchecked @@ -325,7 +317,6 @@ public final class MapboxMap { * * @param layer the layer to add */ - @UiThread public void addLayer(@NonNull Layer layer) { nativeMapView.addLayer(layer); } @@ -336,7 +327,6 @@ public final class MapboxMap { * @param layer the layer to add * @param below the layer id to add this layer before */ - @UiThread public void addLayerBelow(@NonNull Layer layer, @NonNull String below) { nativeMapView.addLayerBelow(layer, below); } @@ -347,7 +337,6 @@ public final class MapboxMap { * @param layer the layer to add * @param above the layer id to add this layer above */ - @UiThread public void addLayerAbove(@NonNull Layer layer, @NonNull String above) { nativeMapView.addLayerAbove(layer, above); } @@ -359,7 +348,6 @@ public final class MapboxMap { * @param layer the layer to add * @param index the index to insert the layer at */ - @UiThread public void addLayerAt(@NonNull Layer layer, @IntRange(from = 0) int index) { nativeMapView.addLayerAt(layer, index); } @@ -370,7 +358,6 @@ public final class MapboxMap { * @param layerId the layer to remove * @return the removed layer or null if not found */ - @UiThread @Nullable public Layer removeLayer(@NonNull String layerId) { return nativeMapView.removeLayer(layerId); @@ -382,7 +369,6 @@ public final class MapboxMap { * @param layer the layer to remove * @return the layer */ - @UiThread @Nullable public Layer removeLayer(@NonNull Layer layer) { return nativeMapView.removeLayer(layer); @@ -394,7 +380,6 @@ public final class MapboxMap { * @param index the layer index * @return the removed layer or null if not found */ - @UiThread @Nullable public Layer removeLayerAt(@IntRange(from = 0) int index) { return nativeMapView.removeLayerAt(index); @@ -405,7 +390,6 @@ public final class MapboxMap { * * @return all the sources in the current style */ - @UiThread public List<Source> getSources() { return nativeMapView.getSources(); } @@ -417,7 +401,6 @@ public final class MapboxMap { * @return the source if present in the current style */ @Nullable - @UiThread public Source getSource(@NonNull String sourceId) { return nativeMapView.getSource(sourceId); } @@ -430,7 +413,6 @@ public final class MapboxMap { * @return the casted Source, null if another type */ @Nullable - @UiThread public <T extends Source> T getSourceAs(@NonNull String sourceId) { try { // noinspection unchecked @@ -446,7 +428,6 @@ public final class MapboxMap { * * @param source the source to add */ - @UiThread public void addSource(@NonNull Source source) { nativeMapView.addSource(source); } @@ -457,7 +438,6 @@ public final class MapboxMap { * @param sourceId the source to remove * @return the source handle or null if the source was not present */ - @UiThread @Nullable public Source removeSource(@NonNull String sourceId) { return nativeMapView.removeSource(sourceId); @@ -469,7 +449,6 @@ public final class MapboxMap { * @param source the source to remove * @return the source */ - @UiThread @Nullable public Source removeSource(@NonNull Source source) { return nativeMapView.removeSource(source); @@ -481,7 +460,6 @@ public final class MapboxMap { * @param name the name of the image * @param image the pre-multiplied Bitmap */ - @UiThread public void addImage(@NonNull String name, @NonNull Bitmap image) { nativeMapView.addImage(name, image); } @@ -491,7 +469,6 @@ public final class MapboxMap { * * @param name the name of the image to remove */ - @UiThread public void removeImage(String name) { nativeMapView.removeImage(name); } @@ -507,7 +484,6 @@ public final class MapboxMap { * * @param minZoom The new minimum zoom level. */ - @UiThread public void setMinZoomPreference( @FloatRange(from = MapboxConstants.MINIMUM_ZOOM, to = MapboxConstants.MAXIMUM_ZOOM) double minZoom) { transform.setMinZoom(minZoom); @@ -520,7 +496,6 @@ public final class MapboxMap { * * @return The minimum zoom level. */ - @UiThread public double getMinZoomLevel() { return transform.getMinZoom(); } @@ -536,7 +511,6 @@ public final class MapboxMap { * * @param maxZoom The new maximum zoom level. */ - @UiThread public void setMaxZoomPreference(@FloatRange(from = MapboxConstants.MINIMUM_ZOOM, to = MapboxConstants.MAXIMUM_ZOOM) double maxZoom) { transform.setMaxZoom(maxZoom); @@ -549,7 +523,6 @@ public final class MapboxMap { * * @return The maximum zoom level. */ - @UiThread public double getMaxZoomLevel() { return transform.getMaxZoom(); } @@ -664,7 +637,6 @@ public final class MapboxMap { * * @param update The change that should be applied to the camera. */ - @UiThread public final void moveCamera(CameraUpdate update) { moveCamera(update, null); } @@ -677,7 +649,6 @@ public final class MapboxMap { * @param update The change that should be applied to the camera * @param callback the callback to be invoked when an animation finishes or is canceled */ - @UiThread public final void moveCamera(final CameraUpdate update, final MapboxMap.CancelableCallback callback) { new Handler().post(new Runnable() { @Override @@ -698,7 +669,6 @@ public final class MapboxMap { * @param update The change that should be applied to the camera. * @see com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates. */ - @UiThread public final void easeCamera(CameraUpdate update) { easeCamera(update, MapboxConstants.ANIMATION_DURATION); } @@ -713,7 +683,6 @@ public final class MapboxMap { * positive, otherwise an IllegalArgumentException will be thrown. * @see com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates. */ - @UiThread public final void easeCamera(CameraUpdate update, int durationMs) { easeCamera(update, durationMs, null); } @@ -737,7 +706,6 @@ public final class MapboxMap { * Do not update or ease the camera from within onCancel(). * @see com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates. */ - @UiThread public final void easeCamera(CameraUpdate update, int durationMs, final MapboxMap.CancelableCallback callback) { easeCamera(update, durationMs, true, callback); } @@ -756,7 +724,6 @@ public final class MapboxMap { * positive, otherwise an IllegalArgumentException will be thrown. * @param easingInterpolator True for easing interpolator, false for linear. */ - @UiThread public final void easeCamera(CameraUpdate update, int durationMs, boolean easingInterpolator) { easeCamera(update, durationMs, easingInterpolator, null); } @@ -782,7 +749,6 @@ public final class MapboxMap { * by a later camera movement or a user gesture, onCancel() will be called. * Do not update or ease the camera from within onCancel(). */ - @UiThread public final void easeCamera(final CameraUpdate update, final int durationMs, final boolean easingInterpolator, final MapboxMap.CancelableCallback callback) { easeCamera(update, durationMs, easingInterpolator, callback, false); @@ -810,7 +776,6 @@ public final class MapboxMap { * Do not update or ease the camera from within onCancel(). * @param isDismissable true will allow animated camera changes dismiss a tracking mode. */ - @UiThread public final void easeCamera(final CameraUpdate update, final int durationMs, final boolean easingInterpolator, final MapboxMap.CancelableCallback callback, final boolean isDismissable) { new Handler().post(new Runnable() { @@ -830,7 +795,6 @@ public final class MapboxMap { * @param update The change that should be applied to the camera. * @see com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates. */ - @UiThread public final void animateCamera(CameraUpdate update) { animateCamera(update, MapboxConstants.ANIMATION_DURATION, null); } @@ -847,7 +811,6 @@ public final class MapboxMap { * called. Do not update or animate the camera from within onCancel(). * @see com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates. */ - @UiThread public final void animateCamera(CameraUpdate update, MapboxMap.CancelableCallback callback) { animateCamera(update, MapboxConstants.ANIMATION_DURATION, callback); } @@ -863,7 +826,6 @@ public final class MapboxMap { * positive, otherwise an IllegalArgumentException will be thrown. * @see com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates. */ - @UiThread public final void animateCamera(CameraUpdate update, int durationMs) { animateCamera(update, durationMs, null); } @@ -886,7 +848,6 @@ public final class MapboxMap { * isn't required, leave it as null. * @see com.mapbox.mapboxsdk.camera.CameraUpdateFactory for a set of updates. */ - @UiThread public final void animateCamera(final CameraUpdate update, final int durationMs, final MapboxMap.CancelableCallback callback) { new Handler().post(new Runnable() { @@ -957,7 +918,6 @@ public final class MapboxMap { * * @return If true, map debug information is currently shown. */ - @UiThread public boolean isDebugActive() { return nativeMapView.getDebug(); } @@ -970,7 +930,6 @@ public final class MapboxMap { * * @param debugActive If true, map debug information is shown. */ - @UiThread public void setDebugActive(boolean debugActive) { nativeMapView.setDebug(debugActive); } @@ -984,7 +943,6 @@ public final class MapboxMap { * * @see #isDebugActive() */ - @UiThread public void cycleDebugOptions() { nativeMapView.cycleDebugOptions(); } @@ -1034,7 +992,6 @@ public final class MapboxMap { * @param url The URL of the map style * @see Style */ - @UiThread public void setStyleUrl(@NonNull String url) { setStyleUrl(url, null); } @@ -1067,7 +1024,6 @@ public final class MapboxMap { * @param callback The callback that is invoked when the style has loaded. * @see Style */ - @UiThread public void setStyleUrl(@NonNull final String url, @Nullable final OnStyleLoadedListener callback) { if (callback != null) { nativeMapView.addOnMapChangedListener(new MapView.OnMapChangedListener() { @@ -1099,7 +1055,6 @@ public final class MapboxMap { * @param style The bundled style. * @see Style */ - @UiThread public void setStyle(@Style.StyleUrl String style) { setStyleUrl(style); } @@ -1116,7 +1071,6 @@ public final class MapboxMap { * @param callback The callback to be invoked when the style has finished loading * @see Style */ - @UiThread public void setStyle(@Style.StyleUrl String style, @Nullable OnStyleLoadedListener callback) { setStyleUrl(style, callback); } @@ -1138,7 +1092,6 @@ public final class MapboxMap { * * @return The URL of the map style */ - @UiThread @Nullable public String getStyleUrl() { return nativeMapView.getStyleUrl(); @@ -1158,7 +1111,6 @@ public final class MapboxMap { * @param markerOptions A marker options object that defines how to render the marker * @return The {@code Marker} that was added to the map */ - @UiThread @NonNull public Marker addMarker(@NonNull MarkerOptions markerOptions) { return annotationManager.addMarker(markerOptions, this); @@ -1174,7 +1126,6 @@ public final class MapboxMap { * @param markerOptions A marker options object that defines how to render the marker * @return The {@code Marker} that was added to the map */ - @UiThread @NonNull public Marker addMarker(@NonNull BaseMarkerOptions markerOptions) { return annotationManager.addMarker(markerOptions, this); @@ -1190,7 +1141,6 @@ public final class MapboxMap { * @param markerOptions A marker options object that defines how to render the marker * @return The {@code Marker} that was added to the map */ - @UiThread @NonNull public MarkerView addMarker(@NonNull BaseMarkerViewOptions markerOptions) { return annotationManager.addMarker(markerOptions, this, null); @@ -1207,7 +1157,6 @@ public final class MapboxMap { * @param onMarkerViewAddedListener Callback invoked when the View has been added to the map * @return The {@code Marker} that was added to the map */ - @UiThread @NonNull public MarkerView addMarker(@NonNull BaseMarkerViewOptions markerOptions, final MarkerViewManager.OnMarkerViewAddedListener onMarkerViewAddedListener) { @@ -1224,7 +1173,6 @@ public final class MapboxMap { * @param markerViewOptions A list of markerView options objects that defines how to render the markers * @return A list of the {@code MarkerView}s that were added to the map */ - @UiThread @NonNull public List<MarkerView> addMarkerViews(@NonNull List<? extends BaseMarkerViewOptions> markerViewOptions) { @@ -1237,7 +1185,6 @@ public final class MapboxMap { * @param rect the rectangular area on the map to query for markerViews * @return A list of the markerViews that were found in the rectangle */ - @UiThread @NonNull public List<MarkerView> getMarkerViewsInRect(@NonNull RectF rect) { return annotationManager.getMarkerViewsInRect(rect); @@ -1253,7 +1200,6 @@ public final class MapboxMap { * @param markerOptionsList A list of marker options objects that defines how to render the markers * @return A list of the {@code Marker}s that were added to the map */ - @UiThread @NonNull public List<Marker> addMarkers(@NonNull List<? extends BaseMarkerOptions> markerOptionsList) { @@ -1267,7 +1213,6 @@ public final class MapboxMap { * * @param updatedMarker An updated marker object */ - @UiThread public void updateMarker(@NonNull Marker updatedMarker) { annotationManager.updateMarker(updatedMarker, this); } @@ -1278,7 +1223,6 @@ public final class MapboxMap { * @param polylineOptions A polyline options object that defines how to render the polyline * @return The {@code Polyine} that was added to the map */ - @UiThread @NonNull public Polyline addPolyline(@NonNull PolylineOptions polylineOptions) { return annotationManager.addPolyline(polylineOptions, this); @@ -1290,7 +1234,6 @@ public final class MapboxMap { * @param polylineOptionsList A list of polyline options objects that defines how to render the polylines. * @return A list of the {@code Polyline}s that were added to the map. */ - @UiThread @NonNull public List<Polyline> addPolylines(@NonNull List<PolylineOptions> polylineOptionsList) { return annotationManager.addPolylines(polylineOptionsList, this); @@ -1301,7 +1244,6 @@ public final class MapboxMap { * * @param polyline An updated polyline object. */ - @UiThread public void updatePolyline(Polyline polyline) { annotationManager.updatePolyline(polyline); } @@ -1312,7 +1254,6 @@ public final class MapboxMap { * @param polygonOptions A polygon options object that defines how to render the polygon. * @return The {@code Polygon} that was added to the map. */ - @UiThread @NonNull public Polygon addPolygon(@NonNull PolygonOptions polygonOptions) { return annotationManager.addPolygon(polygonOptions, this); @@ -1324,7 +1265,6 @@ public final class MapboxMap { * @param polygonOptionsList A list of polygon options objects that defines how to render the polygons * @return A list of the {@code Polygon}s that were added to the map */ - @UiThread @NonNull public List<Polygon> addPolygons(@NonNull List<PolygonOptions> polygonOptionsList) { return annotationManager.addPolygons(polygonOptionsList, this); @@ -1335,7 +1275,6 @@ public final class MapboxMap { * * @param polygon An updated polygon object */ - @UiThread public void updatePolygon(Polygon polygon) { annotationManager.updatePolygon(polygon); } @@ -1348,7 +1287,6 @@ public final class MapboxMap { * * @param marker Marker to remove */ - @UiThread public void removeMarker(@NonNull Marker marker) { annotationManager.removeAnnotation(marker); } @@ -1361,7 +1299,6 @@ public final class MapboxMap { * * @param polyline Polyline to remove */ - @UiThread public void removePolyline(@NonNull Polyline polyline) { annotationManager.removeAnnotation(polyline); } @@ -1374,7 +1311,6 @@ public final class MapboxMap { * * @param polygon Polygon to remove */ - @UiThread public void removePolygon(@NonNull Polygon polygon) { annotationManager.removeAnnotation(polygon); } @@ -1384,7 +1320,6 @@ public final class MapboxMap { * * @param annotation The annotation object to remove. */ - @UiThread public void removeAnnotation(@NonNull Annotation annotation) { annotationManager.removeAnnotation(annotation); } @@ -1394,7 +1329,6 @@ public final class MapboxMap { * * @param id The identifier associated to the annotation to be removed */ - @UiThread public void removeAnnotation(long id) { annotationManager.removeAnnotation(id); } @@ -1404,7 +1338,6 @@ public final class MapboxMap { * * @param annotationList A list of annotation objects to remove. */ - @UiThread public void removeAnnotations(@NonNull List<? extends Annotation> annotationList) { annotationManager.removeAnnotations(annotationList); } @@ -1412,7 +1345,6 @@ public final class MapboxMap { /** * Removes all annotations from the map. */ - @UiThread public void removeAnnotations() { annotationManager.removeAnnotations(); } @@ -1420,7 +1352,6 @@ public final class MapboxMap { /** * Removes all markers, polylines, polygons, overlays, etc from the map. */ - @UiThread public void clear() { annotationManager.removeAnnotations(); } @@ -1486,7 +1417,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the user clicks on a marker. * To unset the callback, use null. */ - @UiThread public void setOnMarkerClickListener(@Nullable OnMarkerClickListener listener) { annotationManager.setOnMarkerClickListener(listener); } @@ -1497,7 +1427,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the user clicks on a polygon. * To unset the callback, use null. */ - @UiThread public void setOnPolygonClickListener(@Nullable OnPolygonClickListener listener) { annotationManager.setOnPolygonClickListener(listener); } @@ -1508,7 +1437,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the user clicks on a polyline. * To unset the callback, use null. */ - @UiThread public void setOnPolylineClickListener(@Nullable OnPolylineClickListener listener) { annotationManager.setOnPolylineClickListener(listener); } @@ -1523,7 +1451,6 @@ public final class MapboxMap { * * @param marker The marker to select. */ - @UiThread public void selectMarker(@NonNull Marker marker) { if (marker == null) { Timber.w("marker was null, so just returning"); @@ -1535,7 +1462,6 @@ public final class MapboxMap { /** * Deselects any currently selected marker. All markers will have it's info window closed. */ - @UiThread public void deselectMarkers() { annotationManager.deselectMarkers(); } @@ -1545,7 +1471,6 @@ public final class MapboxMap { * * @param marker the marker to deselect */ - @UiThread public void deselectMarker(@NonNull Marker marker) { annotationManager.deselectMarker(marker); } @@ -1555,7 +1480,6 @@ public final class MapboxMap { * * @return The currently selected marker. */ - @UiThread public List<Marker> getSelectedMarkers() { return annotationManager.getSelectedMarkers(); } @@ -1583,7 +1507,6 @@ public final class MapboxMap { * @param infoWindowAdapter The callback to be invoked when an info window will be shown. * To unset the callback, use null. */ - @UiThread public void setInfoWindowAdapter(@Nullable InfoWindowAdapter infoWindowAdapter) { annotationManager.getInfoWindowManager().setInfoWindowAdapter(infoWindowAdapter); } @@ -1593,7 +1516,6 @@ public final class MapboxMap { * * @return The callback to be invoked when an info window will be shown. */ - @UiThread @Nullable public InfoWindowAdapter getInfoWindowAdapter() { return annotationManager.getInfoWindowManager().getInfoWindowAdapter(); @@ -1604,7 +1526,6 @@ public final class MapboxMap { * * @param allow If true, map allows concurrent multiple infowindows to be shown. */ - @UiThread public void setAllowConcurrentMultipleOpenInfoWindows(boolean allow) { annotationManager.getInfoWindowManager().setAllowConcurrentMultipleOpenInfoWindows(allow); } @@ -1614,7 +1535,6 @@ public final class MapboxMap { * * @return If true, map allows concurrent multiple infowindows to be shown. */ - @UiThread public boolean isAllowConcurrentMultipleOpenInfoWindows() { return annotationManager.getInfoWindowManager().isAllowConcurrentMultipleOpenInfoWindows(); } @@ -1708,7 +1628,6 @@ public final class MapboxMap { * @param listener The callback that's invoked on every camera change position. * To unset the callback, use null. */ - @UiThread @Deprecated public void setOnCameraChangeListener(@Nullable OnCameraChangeListener listener) { transform.setOnCameraChangeListener(listener); @@ -1719,7 +1638,6 @@ public final class MapboxMap { * * @param listener the listener to notify */ - @UiThread public void setOnCameraIdleListener(@Nullable OnCameraIdleListener listener) { cameraChangeDispatcher.setOnCameraIdleListener(listener); } @@ -1729,7 +1647,6 @@ public final class MapboxMap { * * @param listener the listener to notify */ - @UiThread public void setOnCameraMoveCancelListener(@Nullable OnCameraMoveCanceledListener listener) { cameraChangeDispatcher.setOnCameraMoveCanceledListener(listener); } @@ -1739,7 +1656,6 @@ public final class MapboxMap { * * @param listener the listener to notify */ - @UiThread public void setOnCameraMoveStartedListener(@Nullable OnCameraMoveStartedListener listener) { cameraChangeDispatcher.setOnCameraMoveStartedListener(listener); } @@ -1749,7 +1665,6 @@ public final class MapboxMap { * * @param listener the listener to notify */ - @UiThread public void setOnCameraMoveListener(@Nullable OnCameraMoveListener listener) { cameraChangeDispatcher.setOnCameraMoveListener(listener); } @@ -1760,7 +1675,6 @@ public final class MapboxMap { * @param listener The callback that's invoked on every frame rendered to the map view. * To unset the callback, use null. */ - @UiThread public void setOnFpsChangedListener(@Nullable OnFpsChangedListener listener) { onFpsChangedListener = listener; } @@ -1776,7 +1690,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the map is scrolled. * To unset the callback, use null. */ - @UiThread public void setOnScrollListener(@Nullable OnScrollListener listener) { onRegisterTouchListener.onRegisterScrollListener(listener); } @@ -1787,7 +1700,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the map is flinged. * To unset the callback, use null. */ - @UiThread public void setOnFlingListener(@Nullable OnFlingListener listener) { onRegisterTouchListener.onRegisterFlingListener(listener); } @@ -1798,7 +1710,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the user clicks on the map view. * To unset the callback, use null. */ - @UiThread public void setOnMapClickListener(@Nullable OnMapClickListener listener) { onRegisterTouchListener.onRegisterMapClickListener(listener); } @@ -1809,7 +1720,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the user long clicks on the map view. * To unset the callback, use null. */ - @UiThread public void setOnMapLongClickListener(@Nullable OnMapLongClickListener listener) { onRegisterTouchListener.onRegisterMapLongClickListener(listener); } @@ -1820,7 +1730,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the user clicks on an info window. * To unset the callback, use null. */ - @UiThread public void setOnInfoWindowClickListener(@Nullable OnInfoWindowClickListener listener) { annotationManager.getInfoWindowManager().setOnInfoWindowClickListener(listener); } @@ -1830,7 +1739,6 @@ public final class MapboxMap { * * @return Current active InfoWindow Click Listener */ - @UiThread public OnInfoWindowClickListener getOnInfoWindowClickListener() { return annotationManager.getInfoWindowManager().getOnInfoWindowClickListener(); } @@ -1841,7 +1749,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when a marker's info window is long pressed. To unset the callback, * use null. */ - @UiThread public void setOnInfoWindowLongClickListener(@Nullable OnInfoWindowLongClickListener listener) { annotationManager.getInfoWindowManager().setOnInfoWindowLongClickListener(listener); @@ -1870,7 +1777,6 @@ public final class MapboxMap { * * @return Current active InfoWindow Close Listener */ - @UiThread public OnInfoWindowCloseListener getOnInfoWindowCloseListener() { return annotationManager.getInfoWindowManager().getOnInfoWindowCloseListener(); } @@ -1884,7 +1790,6 @@ public final class MapboxMap { * * @return True if the my-location layer is enabled, false otherwise. */ - @UiThread public boolean isMyLocationEnabled() { return trackingSettings.isMyLocationEnabled(); } @@ -1900,7 +1805,6 @@ public final class MapboxMap { * * @param enabled True to enable; false to disable. */ - @UiThread public void setMyLocationEnabled(boolean enabled) { trackingSettings.setMyLocationEnabled(enabled); } @@ -1910,7 +1814,6 @@ public final class MapboxMap { * * @return The currently displayed user location. */ - @UiThread @Nullable public Location getMyLocation() { return trackingSettings.getMyLocation(); @@ -1923,7 +1826,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the user clicks on a marker. * To unset the callback, use null. */ - @UiThread public void setOnMyLocationChangeListener(@Nullable MapboxMap.OnMyLocationChangeListener listener) { trackingSettings.setOnMyLocationChangeListener(listener); @@ -1934,7 +1836,6 @@ public final class MapboxMap { * * @param locationSource A {@link LocationEngine} location source to use in the my-location layer. */ - @UiThread public void setLocationSource(@Nullable LocationEngine locationSource) { trackingSettings.setLocationSource(locationSource); } @@ -1945,7 +1846,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the location tracking mode changes. * To unset the callback, use null. */ - @UiThread public void setOnMyLocationTrackingModeChangeListener( @Nullable MapboxMap.OnMyLocationTrackingModeChangeListener listener) { trackingSettings.setOnMyLocationTrackingModeChangeListener(listener); @@ -1957,7 +1857,6 @@ public final class MapboxMap { * @param listener The callback that's invoked when the bearing tracking mode changes. * To unset the callback, use null. */ - @UiThread public void setOnMyBearingTrackingModeChangeListener(@Nullable OnMyBearingTrackingModeChangeListener listener) { trackingSettings.setOnMyBearingTrackingModeChangeListener(listener); } @@ -1971,7 +1870,6 @@ public final class MapboxMap { * * @param callback Callback method invoked when the snapshot is taken. */ - @UiThread public void snapshot(@NonNull SnapshotReadyCallback callback) { nativeMapView.addSnapshotCallback(callback); } @@ -1983,7 +1881,6 @@ public final class MapboxMap { * @param layerIds optionally - only query these layers * @return the list of feature */ - @UiThread @NonNull public List<Feature> queryRenderedFeatures(@NonNull PointF coordinates, @Nullable String... layerIds) { @@ -1998,7 +1895,6 @@ public final class MapboxMap { * @param layerIds optionally - only query these layers * @return the list of feature */ - @UiThread @NonNull public List<Feature> queryRenderedFeatures(@NonNull PointF coordinates, @Nullable Filter.Statement filter, @@ -2013,7 +1909,6 @@ public final class MapboxMap { * @param layerIds optionally - only query these layers * @return the list of feature */ - @UiThread @NonNull public List<Feature> queryRenderedFeatures(@NonNull RectF coordinates, @Nullable String... layerIds) { @@ -2028,7 +1923,6 @@ public final class MapboxMap { * @param layerIds optionally - only query these layers * @return the list of feature */ - @UiThread @NonNull public List<Feature> queryRenderedFeatures(@NonNull RectF coordinates, @Nullable Filter.Statement filter, |