Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Fix misconceptions about URI permission grants via Intents#55

Merged
nic0lette merged 3 commits into
android:masterfrom
cketti:no_flags
Jun 29, 2020
Merged

Fix misconceptions about URI permission grants via Intents#55
nic0lette merged 3 commits into
android:masterfrom
cketti:no_flags

Conversation

@cketti
Copy link
Copy Markdown
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.

cketti added 3 commits June 25, 2020 15:09
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
Copy Markdown
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
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.

3 participants