Improved EXIF parsing for Android App #1602
Open
+272
−75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Put the mobile app in line with the changes of #1588.
Basically a port of the changes of to the mobile application. The image.dateTaken of a SystemImage is now taken from (in order of priority) any exif field as given by ExifInterface, DATE_TAKEN from MediaStore, or DATE_MODIFIED from MediaStore.
The Exif fields are normalized and parsed with a formatter, then the oldest date is chosen. If no date is available from Exif, it falls back to dateTaken or mtime, logging the decision as it does.
Unlike #1588 there is no simple and efficient way, that I see at least, for GPS timezone inference as the places database is not available on mobile.
Just like #1601, before this I had a lot of local images defaulting to 1970 and being duplicated from local to remote, this solved all my problems, along with the web version from #1588.
Also add null checks while accessing MediaStore columns, this seems to solve problems for certain buckets not synchronizing.