Skip to content

Conversation

riknoll
Copy link
Contributor

@riknoll riknoll commented Mar 28, 2016

The associated JIRA is CB-10977. Check out the description on the issue for an explanation of the problem. I also added some JS that reproduces it in the comments. This fix is contingent on apache/cordova-android#285 to completely fix the problem (I plan to merge that PR soon).

This will also change the behavior when used with older versions of cordova-android (i.e. without apache/cordova-android#285) and should prevent some of the weirder bugs. The behavior will still be incorrect, but less so.

@riknoll
Copy link
Contributor Author

riknoll commented Mar 28, 2016

@infil00p @jasongin @rakatyal please review when you have a moment. Also, should I add manual tests for this? It requires interacting with permission dialogs, so we can't really do any auto tests.

callback.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, SECURITY_ERR));
if(r == PackageManager.PERMISSION_DENIED)
{
req.getCallbackContext().sendPluginResult(new PluginResult(PluginResult.Status.ERROR, SECURITY_ERR));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a return after this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, yep! Good catch! It doesn't look like there was a return there before either so I wonder how that worked.

@asfgit asfgit closed this in 6aeb9d9 Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants