summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorŁukasz Paczos <lukasz.paczos@mapbox.com>2018-01-29 15:36:38 -0500
committerTobrun <tobrun@mapbox.com>2018-02-05 12:03:19 +0100
commitc636b382e8bd61a05dd976d9aeb0ce5ae0894b0e (patch)
tree9007ac12ac6ffbbcaa04aa0da3757c0b6ab92304 /platform
parentcecfa1834658e4ed65ecf8656f0d32bbe678ad9d (diff)
downloadqtlocation-mapboxgl-c636b382e8bd61a05dd976d9aeb0ce5ae0894b0e.tar.gz
[android] - log lack of permissions only if enabling location
Diffstat (limited to 'platform')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/TrackingSettings.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/TrackingSettings.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/TrackingSettings.java
index 6eacbbaeaf..81fd091c90 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/TrackingSettings.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/TrackingSettings.java
@@ -374,7 +374,7 @@ public final class TrackingSettings {
}
private void setMyLocationEnabled(boolean locationEnabled, boolean isCustomLocationSource) {
- if (!PermissionsManager.areLocationPermissionsGranted(myLocationView.getContext())) {
+ if (locationEnabled && !PermissionsManager.areLocationPermissionsGranted(myLocationView.getContext())) {
Timber.e("Could not activate user location tracking: "
+ "user did not accept the permission or permissions were not requested.");
return;