Skip to content
Merged
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
Expand Up @@ -134,7 +134,6 @@ public LocationLayerPlugin(@NonNull MapView mapView, @NonNull MapboxMap mapboxMa
* @param isEnabled true to show layers and enable camera, false otherwise
* @since 0.5.0
*/
@RequiresPermission(anyOf = {ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION})
public void setLocationLayerEnabled(boolean isEnabled) {
if (isEnabled) {
enableLocationLayerPlugin();
Expand Down Expand Up @@ -262,7 +261,6 @@ public void forceLocationUpdate(@Nullable Location location) {
* @param locationEngine a {@link LocationEngine} this plugin should use to handle updates
* @since 0.1.0
*/
@SuppressWarnings( {"MissingPermission"})
public void setLocationEngine(@Nullable LocationEngine locationEngine) {
if (this.locationEngine != null) {
this.locationEngine.removeLocationEngineListener(locationEngineListener);
Expand Down Expand Up @@ -294,8 +292,8 @@ public LocationEngine getLocationEngine() {
* @return the last known location
* @since 0.1.0
*/
@SuppressLint("MissingPermission")
@Nullable
@RequiresPermission(anyOf = {ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION})
public Location getLastKnownLocation() {
return locationEngine != null ? locationEngine.getLastLocation() : null;
}
Expand Down Expand Up @@ -413,7 +411,6 @@ public void removeOnLocationStaleListener(@NonNull OnLocationStaleListener liste
*
* @since 0.1.0
*/
@RequiresPermission(anyOf = {ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION})
@OnLifecycleEvent(Lifecycle.Event.ON_START)
public void onStart() {
onLocationLayerStart();
Expand Down Expand Up @@ -486,7 +483,6 @@ private void initialize() {
setCameraMode(CameraMode.NONE);
}

@SuppressLint("MissingPermission")
private void enableLocationLayerPlugin() {
isEnabled = true;
onLocationLayerStart();
Expand Down Expand Up @@ -533,7 +529,7 @@ private void updateCompassHeading(float heading) {
* If the locationEngine contains a last location value, we use it for the initial location layer
* position.
*/
@SuppressWarnings( {"MissingPermission"})
@SuppressLint("MissingPermission")
private void setLastLocation() {
if (locationEngine != null) {
updateLocation(locationEngine.getLastLocation());
Expand All @@ -544,6 +540,7 @@ private void setLastCompassHeading() {
updateCompassHeading(compassManager.getLastHeading());
}

@SuppressLint("MissingPermission")
private void updateLayerOffsets(boolean forceUpdate) {
CameraPosition position = mapboxMap.getCameraPosition();
if (lastCameraPosition == null || forceUpdate) {
Expand Down