Skip to content

Conversation

@naveensingh
Copy link
Member

Type of change(s)

  • Bug fix
  • Feature / enhancement
  • Infrastructure / tooling (CI, build, deps, tests)
  • Documentation

What changed and why

Added a non-exhaustive list of EXIF attributes for restoring after editing/resizing images. In minified builds, R8 inlines and strips TAG_* fields, so the original reflection logic using ExifInterface::class.java.fields fails, and no attributes are restored. It's better to keep a list instead of relying on reflection.

Closes the following issue(s)

Checklist

  • I read the contribution guidelines.
  • I manually tested my changes on device/emulator (if applicable).
  • I updated the "Unreleased" section in CHANGELOG.md (if applicable).
  • All checks are passing.

In minified builds, R8 inlines and strips those fields so `ExifInterface::class.java.fields` returns nothing.

Refs: #29
@naveensingh naveensingh changed the title fix: don't use reflection for finding EXIF attributes fix: don't use reflection to find EXIF attributes Sep 7, 2025
@naveensingh naveensingh merged commit 3700b3f into main Sep 7, 2025
5 checks passed
@naveensingh naveensingh deleted the naveensingh/reflection-is-so-2000s branch September 7, 2025 13:13
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.

Metadata like timestamp missing after editing / falsely replaced with current date

2 participants