Github user jasongin commented on a diff in the pull request: https://github.com/apache/cordova-plugin-file/pull/174#discussion_r57761716 --- Diff: src/android/FileUtils.java --- @@ -1151,51 +1140,55 @@ private long truncateFile(String srcURLstr, long size) throws FileNotFoundExcept public void onRequestPermissionResult(int requestCode, String[] permissions, int[] grantResults) throws JSONException { - for(int r:grantResults) - { - if(r == PackageManager.PERMISSION_DENIED) + + final PendingRequests.Request req = pendingRequests.getAndRemove(requestCode); + if (req != null) { + for(int r:grantResults) { - callback.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, SECURITY_ERR)); + if(r == PackageManager.PERMISSION_DENIED) + { + req.getCallbackContext().sendPluginResult(new PluginResult(PluginResult.Status.ERROR, SECURITY_ERR)); --- End diff -- Should there be a return after this line?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org