Skip to content

Commit

Permalink
fix(android): Reject on FS permission prompt cancelation (#4185)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Feb 9, 2021
1 parent 9d7bf79 commit d6991cb
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,13 @@ protected void handleRequestPermissionsResult(int requestCode, String[] permissi

PluginCall savedCall = getSavedCall();

if (grantResults.length == 0) {
Logger.debug(getLogTag(), "Permission prompt was canceled.");
savedCall.error(PERMISSION_DENIED_ERROR);
this.freeSavedCall();
return;
}

for (int i = 0; i < grantResults.length; i++) {
int result = grantResults[i];
String perm = permissions[i];
Expand Down

0 comments on commit d6991cb

Please sign in to comment.