diff options
author | Roman Romanov <rromanov@65gb.net> | 2017-04-10 08:38:45 +0300 |
---|---|---|
committer | Roman Romanov <rromanov@65gb.net> | 2017-04-12 12:51:05 +0300 |
commit | 6168145711fea4c02b22bda534327d857c35257c (patch) | |
tree | efc5b5f2b97da8b3e527f5307fcc3459b548caad /android/src/com/mapswithme/maps/location/LocationHelper.java | |
parent | b13bf49cefac79a7cb8d7af001fd9fd44d215a9e (diff) |
[android] Review fixesbeta-746
Diffstat (limited to 'android/src/com/mapswithme/maps/location/LocationHelper.java')
-rw-r--r-- | android/src/com/mapswithme/maps/location/LocationHelper.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/src/com/mapswithme/maps/location/LocationHelper.java b/android/src/com/mapswithme/maps/location/LocationHelper.java index 64b0828aa8..4260590856 100644 --- a/android/src/com/mapswithme/maps/location/LocationHelper.java +++ b/android/src/com/mapswithme/maps/location/LocationHelper.java @@ -16,9 +16,11 @@ import com.mapswithme.maps.routing.RoutingController; import com.mapswithme.util.Config; import com.mapswithme.util.Listeners; import com.mapswithme.util.LocationUtils; +import com.mapswithme.util.PermissionsUtils; import com.mapswithme.util.Utils; import com.mapswithme.util.log.Logger; import com.mapswithme.util.log.LoggerFactory; +import com.mapswithme.util.permissions.PermissionsResult; public enum LocationHelper { @@ -476,6 +478,12 @@ public enum LocationHelper mLogger.d(TAG, "startInternal(), current provider is '" + mLocationProvider + "' , my position mode = " + LocationState.nameOf(getMyPositionMode()) + ", mInFirstRun = " + mInFirstRun); + if (!PermissionsUtils.isLocationGranted()) + { + mLogger.w(TAG, "Dynamic permission ACCESS_COARSE_LOCATION/ACCESS_FINE_LOCATION is not granted", + new Throwable()); + return; + } checkProviderInitialization(); //noinspection ConstantConditions mLocationProvider.start(); |