diff options
author | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-01-29 15:36:38 -0500 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-01-31 10:31:05 +0100 |
commit | 7694c9c879ae1f9817166576a7c3b484da875ba6 (patch) | |
tree | 2ec3f56bb1e56f9be534d5c3b8885e5af8752b2e /platform/android/MapboxGLAndroidSDK | |
parent | 77f93996d53b88765f1430c8a28fb834e99f388a (diff) | |
download | qtlocation-mapboxgl-7694c9c879ae1f9817166576a7c3b484da875ba6.tar.gz |
[android] - log lack of permissions only if enabling location
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/TrackingSettings.java | 2 |
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; |