public static boolean isReadExternalStoragePermissionsRequired(
      @NonNull Context context, @NonNull Uri uri) {
    return Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
        && context.checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE)
            != PackageManager.PERMISSION_GRANTED
        && isUriRequiresPermissions(context, uri);
  }
Check if the given picked image URI requires READ_EXTERNAL_STORAGE permissions.<br>
Only relevant for API version 23 and above and not required for all URI's depends on the
implementation of the app that was used for picking the image. So we just test if we can open
the stream or do we get an exception when we try, Android is awesome.

@param context used to access Android APIs, like content resolve, it is your
    activity/fragment/widget.
@param uri the result URI of image pick.
@return true - required permission are not granted, false - either no need for permissions or
    they are granted
core/src/main/java/com/theartofdev/edmodo/cropper/CropImage.java