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 misconceptions about URI permission grants via Intents #55

Merged
merged 3 commits into from Jun 29, 2020
Merged

Fix misconceptions about URI permission grants via Intents #55

merged 3 commits into from Jun 29, 2020

Conversation

cketti
Copy link
Contributor

@cketti cketti commented Jun 25, 2020

It's not necessary to add flags to the ACTION_OPEN_DOCUMENT and ACTION_OPEN_DOCUMENT_TREE Intents. They will be ignored.

FLAG_GRANT_*_URI_PERMISSION is not used to request URI read/write permissions. Those flags are used to signal the OS that the Intent sender wishes to grant the receiver of an Intent the permission to access content: URIs within the Intent. The documentation of ACTION_OPEN_DOCUMENT doesn't mention these flags and unconditionally states:

> All selected documents are returned to the calling application with persistable read and write permission grants.
They are not supported by the ACTION_OPEN_DOCUMENT_TREE Intent. The intended behavior is how ACTION_OPEN_DOCUMENT_TREE works by default.
Copy link
Contributor

@nic0lette nic0lette left a comment

Choose a reason for hiding this comment

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

Thank you :)

@nic0lette nic0lette merged commit 9339e3d into android:master Jun 29, 2020
1 check passed
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.

None yet

2 participants