Skip to content

fix(settings): resolve local audio permission issues and Compose crash#47

Open
Jolimunium wants to merge 4 commits into
sohilsayed:mainfrom
Jolimunium:main
Open

fix(settings): resolve local audio permission issues and Compose crash#47
Jolimunium wants to merge 4 commits into
sohilsayed:mainfrom
Jolimunium:main

Conversation

@Jolimunium

@Jolimunium Jolimunium commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

This PR addresses two issues:

  1. An app crash when scrolling through the Anki group in Settings due to Compose slot table corruption.
  2. File access failures (EACCES) when importing local audio database files on custom ROMs.

Details

  • 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.

Screenshot

Screenshot_2026-07-07-02-49-52-270_app chimahon

Add a 👍 reaction to pull requests you find important.

…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.
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.

1 participant