Commit 2e542df
fix: read EXIF orientation directly for plain file paths
getImageOrientation prefixed non-content paths with "content://media"
and queried the MediaStore content provider first, falling back to EXIF
when that failed. For a plain filesystem path pointing at an existing
file (e.g. an app cache file), that constructed Uri is never resolvable
and the query always fails — on some devices by throwing
IllegalArgumentException ("Volume data not found"), which was logged
as an error with a stack trace on every call.
Such files carry their orientation only in EXIF, so read it directly
and skip the doomed provider query. MediaStore-style paths (which do
not exist on the filesystem) keep the previous behavior.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ccee838 commit 2e542df
1 file changed
Lines changed: 8 additions & 0 deletions
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | 103 | | |
| |||
0 commit comments