feat: Migrate option file selector to SAF#2953
Open
X1nto wants to merge 8 commits intoReVanced:devfrom
Open
Conversation
Member
|
If we exit the app does it remove these files? |
Member
|
Yes, it's stored in the same place as the temporary files generated for patcher |
Axelen123
requested changes
Feb 19, 2026
Member
Axelen123
left a comment
There was a problem hiding this comment.
The temporary files will be gone after an app restart and won't be present if manager attempts to use saved patch options. This is partly why I chose not to use SAF when implementing patch options.
app/src/main/java/app/revanced/manager/ui/component/patches/OptionFields.kt
Outdated
Show resolved
Hide resolved
Axelen123
reviewed
Feb 21, 2026
| work-runtime-ktx = { group = "androidx.work", name = "work-runtime-ktx", version.ref = "work-runtime" } | ||
| preferences-datastore = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "preferences-datastore" } | ||
| appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" } | ||
| documentfile = { group = "androidx.documentfile", name = "documentfile", version.ref="documentfile" } |
Member
There was a problem hiding this comment.
Suggested change
| documentfile = { group = "androidx.documentfile", name = "documentfile", version.ref="documentfile" } | |
| documentfile = { group = "androidx.documentfile", name = "documentfile", version.ref = "documentfile" } |
Member
|
@X1nto app restarts still need to be handled, since the temporary directory will be cleared on restarts. To fix this, you could:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This gets rid of external file access requirements by moving the patcher options path selector to Storage Access Framework. Because of this change, it has become necessary to 1) separate folder and file selector actions and 2) copy selected folder/file to the app's internal storage. Internal storage refers to Filesystem.tempDir.
androidx.documentfile was added to handle SAF and everything related to external storage permissions have been removed.
screen-20260219-230118.mp4