hammer-editor/android
Adam Brown e8c87d049a Fix Encyclopedia image selection on Android
The suspend FileKit dialog API resolves the ActivityResultRegistry from a
global set only by FileKit.init(). It was never called on any activity, so
the picker in ProjectRootActivity (encyclopedia) either targeted a stale
registry (result never delivered) or threw and was silently swallowed.
Call FileKit.init(this) in both activities' onCreate.

Once the picker returned a file, readExternalFile crashed: stageIntoCache
hands it a plain cache file path, but AndroidExternalFileIo forced every
path through ContentResolver (content:// only). Branch on URI scheme so
file paths are read directly, matching desktop/iOS.

Concise alternative if you prefer a shorter body:

Fix Encyclopedia image selection on Android

- Call FileKit.init(this) in both activities so the suspend picker API has
a live ActivityResultRegistry; without it the encyclopedia picker failed
silently.
- AndroidExternalFileIo.readExternalFile now handles plain file paths (not
just content:// URIs), fixing the crash on the staged cache path.
2026-07-12 23:24:59 -07:00
..
playstore Prep for Google Play release 2023-04-24 17:55:05 -07:00
src Fix Encyclopedia image selection on Android 2026-07-12 23:24:59 -07:00
build.gradle.kts Strip dep info blob from fdroid builds 2026-06-22 02:08:29 -07:00
proguard-rules.pro Save exception info from proguard 2025-12-25 11:32:53 -08:00