Possible exception fix
This commit is contained in:
parent
ec8390b923
commit
924c864ff6
1 changed files with 3 additions and 0 deletions
|
@ -1193,12 +1193,15 @@ public class MapControlsLayer extends OsmandMapLayer {
|
||||||
|
|
||||||
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||||
if (requestCode == REQUEST_LOCATION_FOR_NAVIGATION_PERMISSION
|
if (requestCode == REQUEST_LOCATION_FOR_NAVIGATION_PERMISSION
|
||||||
|
&& grantResults.length > 0
|
||||||
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||||
onNavigationClick();
|
onNavigationClick();
|
||||||
} else if (requestCode == REQUEST_LOCATION_FOR_NAVIGATION_FAB_PERMISSION
|
} else if (requestCode == REQUEST_LOCATION_FOR_NAVIGATION_FAB_PERMISSION
|
||||||
|
&& grantResults.length > 0
|
||||||
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||||
navigateFab();
|
navigateFab();
|
||||||
} else if (requestCode == REQUEST_LOCATION_FOR_ADD_DESTINATION_PERMISSION
|
} else if (requestCode == REQUEST_LOCATION_FOR_ADD_DESTINATION_PERMISSION
|
||||||
|
&& grantResults.length > 0
|
||||||
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||||
addDestination(requestedLatLon);
|
addDestination(requestedLatLon);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue