screentinker/android
ScreenTinker cd6e39a4a7 Fix Android app OOM crash on 4K images and crash loop recovery
A 4K image assigned to a 1080p display decoded as a ~33 MB ARGB_8888
bitmap and OOM'd. Worse, the cached playlist on disk meant relaunch
hit the same image and crashed again — only a reinstall recovered.

New ImageLoader utility reads bounds via inJustDecodeBounds, computes
inSampleSize against the device screen (or zone size for multi-zone
layouts), and returns null on OOM/Throwable so callers skip the item
instead of crashing. MediaPlayerManager exposes an onImageError
callback wired to playlistController.next() so a bad item advances
the playlist. The cached-playlist restore in onCreate now catches
Throwable (was Exception) and clears the cache on any failure,
breaking the crash loop. android:largeHeap="true" added as belt and
braces.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 10:13:10 -05:00
..
app Fix Android app OOM crash on 4K images and crash loop recovery 2026-04-28 10:13:10 -05:00
gradle/wrapper Initial open source release 2026-04-08 12:14:53 -05:00
build.gradle.kts Initial open source release 2026-04-08 12:14:53 -05:00
gradle.properties Initial open source release 2026-04-08 12:14:53 -05:00
gradlew Initial open source release 2026-04-08 12:14:53 -05:00
gradlew.bat Initial open source release 2026-04-08 12:14:53 -05:00
settings.gradle.kts Initial open source release 2026-04-08 12:14:53 -05:00