Don't ask permission

This commit is contained in:
vshcherb 2020-06-19 15:10:12 +02:00 committed by GitHub
parent 37465266aa
commit 55a377cb47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -466,13 +466,13 @@ public class MapActivityActions implements DialogProvider {
} else if (standardId == R.string.context_menu_item_search) {
mapActivity.showQuickSearch(latitude, longitude);
} else if (standardId == R.string.context_menu_item_directions_from) {
if (OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)) {
//if (OsmAndLocationProvider.isLocationPermissionAvailable(mapActivity)) {
enterDirectionsFromPoint(latitude, longitude);
} else {
ActivityCompat.requestPermissions(mapActivity,
new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION);
}
//} else {
// ActivityCompat.requestPermissions(mapActivity,
// new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
// REQUEST_LOCATION_FOR_DIRECTIONS_NAVIGATION_PERMISSION);
//}
} else if (standardId == R.string.measurement_tool) {
mapActivity.getContextMenu().close();
MeasurementToolFragment.showInstance(mapActivity.getSupportFragmentManager(), new LatLon(latitude, longitude));