Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Add check for isPermissionRevokedByPolicy, #23 #24

Merged
merged 1 commit into from Dec 7, 2015
Merged

Add check for isPermissionRevokedByPolicy, #23 #24

merged 1 commit into from Dec 7, 2015

Conversation

eleventigers
Copy link
Contributor

Users should not be bothered with a permission request dialog which will always be negated by a revoked permission policy. This PR ads a check to make sure that a policy is not automatically denying a permission before issuing a permission request.

More info on the difference between isPermissionRevokedByPolicy an shouldShowRequestPermissionRequestRationale here.

tbruyelle added a commit that referenced this pull request Dec 7, 2015
Add check for isPermissionRevokedByPolicy, #23
@tbruyelle tbruyelle merged commit 78e0b51 into tbruyelle:master Dec 7, 2015
@tbruyelle
Copy link
Owner

Very clean PR thanks !

@tbruyelle
Copy link
Owner

Is there a reason why you used variadic parameters in isRevoled ? (other than replicating isGranted's signature)

I'm asking you that because in the current code state there's no good reason to use variadic parameters for both isResolved and isGranted. I would like to change that and use a standard parameter, a permission.

@eleventigers
Copy link
Contributor Author

@tbruyelle it was merely to match the current API but yes, I agree, variadics should not be used here. Hopefully you can resolve this with the next major bump ;]

@tbruyelle
Copy link
Owner

I will :)

@eleventigers eleventigers deleted the issue-23 branch December 7, 2015 14:03
@tbruyelle
Copy link
Owner

0.5.0 deployed with your PR and without variadic param.

@eleventigers
Copy link
Contributor Author

Awesome, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants