Files
Samuel Newman 15a67a59a2 fix android crash when sharing unreadable media
handleIntent runs synchronously on the module init path (OnCreate ->
getConstants), so any exception while reading a shared content:// URI
crashed the whole app at launch rather than just failing the share.

getBitmap, the video file copy, and MediaMetadataRetriever.setDataSource
can all throw (revoked permission, deleted file, a provider that rejects
the read). Wrap each in try/catch and skip the offending media instead.
Images that fail are dropped from the batch; if none succeed we bail
early. Also release the MediaMetadataRetriever, which was never freed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 17:12:11 +03:00
..