code: static boolean checkLocationPermissions(Activity targetActivity,
        AirMapInterface airMapInterface) {
      if (hasSelfPermissions(targetActivity, LOCATION_PERMISSIONS)) {
        airMapInterface.onLocationPermissionsGranted();
        return true;
      } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
        targetActivity.requestPermissions(LOCATION_PERMISSIONS, LOCATION_PERMISSION_REQUEST_CODE);
      }
      //else don't have location permissions in pre M, don't do anything.
      return false;
    }
docs: Check if any location permissions are granted, and invoke onLocationPermissionsGranted() in the
  callback if granted. It will ask users for location permissions and invoke the same callback if
  no permission was granted and got granted at runtime.
  
  @param airMapInterface the callback interface if permission is granted.