Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): Reject on permission prompt cancelation #4185

Merged
merged 1 commit into from
Feb 9, 2021

Conversation

jcesarmobile
Copy link
Member

If a permission prompt is present and you manage to show another one, the previous one gets canceled and crash the app.
When the prompt is canceled, the grantResults.length is 0, so the PR checks the lenght and if 0, reject with PERMISSION_DENIED_ERROR.
Could use a new error, but that probably requires a minor release, and verified that the problem is not present on Capacitor 3 (probably because of the usage of the callback APIs), so this will be short lived.

closes #4170

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.

3 participants