From 924c864ff6dd5c2c22eabd9bb4d82d73cbc78a49 Mon Sep 17 00:00:00 2001 From: "Igor B. Poretsky" Date: Wed, 6 Sep 2017 04:22:37 +0300 Subject: [PATCH] Possible exception fix --- OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java index ca38a06a9c..50bb769fca 100644 --- a/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/MapControlsLayer.java @@ -1193,12 +1193,15 @@ public class MapControlsLayer extends OsmandMapLayer { public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { if (requestCode == REQUEST_LOCATION_FOR_NAVIGATION_PERMISSION + && grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { onNavigationClick(); } else if (requestCode == REQUEST_LOCATION_FOR_NAVIGATION_FAB_PERMISSION + && grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { navigateFab(); } else if (requestCode == REQUEST_LOCATION_FOR_ADD_DESTINATION_PERMISSION + && grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { addDestination(requestedLatLon); }