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

Support a lack of MANAGE_DOCUMENTS permission #551

Merged
merged 2 commits into from
Sep 14, 2023

Conversation

stevesoltys
Copy link
Member

@stevesoltys stevesoltys commented Sep 10, 2023

Copy of #480, rebased on android13.

This PR is working based on my testing (we may need to address the PR comments in #480 still).

@stevesoltys stevesoltys changed the title [UNTESTED] Support a lack of MANAGE_DOCUMENTS permission Support a lack of MANAGE_DOCUMENTS permission Sep 10, 2023
summary = context.getString(R.string.storage_user_selected_location_summary),
availableBytes = null,
isUsb = false, // TODO: Check this if possible instead of forcing false
requiresNetwork = false, // TODO: Check this if possible instead of forcing false
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess those are the downsides of using a fake root. We can't know how to set those flags.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm. I guess we could ask the user if the storage they selected is USB to fix this? Could open a ticket for this if you think it would work...

app/src/main/res/values/strings.xml Outdated Show resolved Hide resolved
@grote
Copy link
Collaborator

grote commented Sep 13, 2023

@stevesoltys maybe drop the [UNTESTED] prefix from the initial commit?

@stevesoltys
Copy link
Member Author

Thanks for the updates @grote. Are all of the review comments resolved with your changes? Seems like they might be?

Will update the initial commit as well.

@grote
Copy link
Collaborator

grote commented Sep 14, 2023

Thanks for the updates @grote. Are all of the review comments resolved with your changes? Seems like they might be?

I think they should be. But please review them as well.

Will update the initial commit as well.

Thanks!

t-m-w and others added 2 commits September 14, 2023 17:22
When `android.permission.MANAGE_DOCUMENTS` is not granted, Seedvault
prompts to select a storage location. Do not insist on resolving the
storage's actual root, as it will likely (or perhaps always) fail.
Use a fake storage root as is done for USB and app-based options.

Known issues:
* Selected location is assumed not to be USB and not to require
  network access in its storage options.

Change-Id: I357b4c68673d71c087be41e9c94c2841c1d6658e
@stevesoltys stevesoltys force-pushed the bugfix/fix-no-manage-documents-permission branch from 8afee58 to 1e69831 Compare September 14, 2023 17:23
@stevesoltys stevesoltys merged commit 77fed00 into android13 Sep 14, 2023
2 checks passed
@stevesoltys stevesoltys deleted the bugfix/fix-no-manage-documents-permission branch September 14, 2023 17:33
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