Skip to content

Add shouldShowRequestPermissionRationale method#9

Open
Tony---Zhang wants to merge 1 commit into
anthonycr:masterfrom
Tony---Zhang:add_should_show_request_method
Open

Add shouldShowRequestPermissionRationale method#9
Tony---Zhang wants to merge 1 commit into
anthonycr:masterfrom
Tony---Zhang:add_should_show_request_method

Conversation

@Tony---Zhang

Copy link
Copy Markdown
Contributor

PermissonManager miss an important method, so I just added it.

Add shouldShowRequestPermissionRationale method into the PermissionManager.

@Tony---Zhang Tony---Zhang force-pushed the add_should_show_request_method branch from 8137230 to 707fd3a Compare November 12, 2015 02:06

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think this should be activity != null && ActivityCompat... because if the activity is null (let's assume we are in a Fragment detached from its parent activity), then actually requesting the permission will fail as it also requires an activity, which means we don't care about showing the rationale because we won't be able to show the permissions request dialog.

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