fix(settings): resolve local audio permission issues and Compose crash#47
Open
Jolimunium wants to merge 4 commits into
Open
fix(settings): resolve local audio permission issues and Compose crash#47Jolimunium wants to merge 4 commits into
Jolimunium wants to merge 4 commits into
Conversation
…ostics UX - Fix transient URI permission revocation when launching background import coroutines by opening input streams synchronously on the main thread during the activity callback. - Implement `openStreamWithFallback` and `getPathFromUri` to resolve local documents and media provider URIs directly to file system paths, allowing direct file reading via `FileInputStream` under the `MANAGE_EXTERNAL_STORAGE` permission (bypasses buggy system-level `ExternalStorageProvider` SecurityExceptions on custom Android ROMs). - Upgrade import UI to collect success/failure status by file name and display an aggregated `AlertDialog` report containing formatted checkmark/cross lists. - Update JNI bridge (`hoshidicts_jni.cpp`) to pass the raw C++ error message in the `title` field on JNI import failure so Kotlin can display detailed native errors.
- fix(settings): resolve Compose crash in Anki settings group by refactoring early returns. - fix(audio): request persistable URI permission synchronously in pickDb launcher. - fix(audio): remove standard file checks (`exists`/`canRead`) in WordAudioDatabase to allow direct native open on virtual paths. - fix(audio): add direct path fallback with validation in WordAudioDatabase. - ux(audio): trigger system permission dialog if database loading fails due to EACCES. - chore(app): override app_name to "Chimahon Dev" in debug source set.
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.
Summary of Changes
This PR addresses two issues:
EACCES) when importing local audio database files on custom ROMs.Details
exists/canRead) in WordAudioDatabase to allow direct native open on virtual paths.Screenshot
Add a 👍 reaction to pull requests you find important.