fix: cannot select directory hangs on “Moving data” (Android) (#484) #498
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.
Description
This PR fixes a bug where changing the data directory could hang on the "Moving data to new directory" screen and silently fall back to the default directory.
Key Changes
Detect non-file-system targets and return a clear “not permitted” result instead of attempting a move that would hang/fail.
Avoid copying
flutter_assets/kernel_blob.bin
and other runtime files to prevent illegal copies.Prevents
use_build_context_synchronously
issues afterawait
calls.Shows confirmation when a move completes successfully.
Aligns with Android 13+ back behavior.
Behavior Notes
content://
URIs) is now blocked with a friendly error.Full SAF directory write support can be added later using existing SAF utilities.
Manual Test Plan
Dependencies
None
Fixes
Fixes #484
Screenshots
N/A (UI unchanged apart from dialogs/snackbar)
Checklist
Notes:
Tests for SAF behavior and settings controller can be added in a follow-up PR (current CI doesn’t run tests).