Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 872e7b70 authored by Ray Chen's avatar Ray Chen
Browse files

Fix b/5353417 Images downloaded from browser are showing incorrect details...

Fix b/5353417 Images downloaded from browser are showing incorrect details (Time is shown as dec 31 1969)

MediaScanner sets DATE_TAKEN with EXIF's datetime tag value. When this information is not available,
ExifInterface will simply return -1 which is accidentally used by MediaScanner.

Adding a check to avoid it so MediaProvider can calculate the date taken from last modified time instead.

Change-Id: I305b93a6c5602cbb9f97c3bbd384d358bda030c6
parent 5571ffdd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -839,7 +839,7 @@ public class MediaScanner
                        // and EXIF local time is not less than 1 Day, otherwise MediaProvider
                        // will use file time as taken time.
                        time = exif.getDateTime();
                        if (Math.abs(mLastModified * 1000 - time) >= 86400000) {
                        if (time != -1 && Math.abs(mLastModified * 1000 - time) >= 86400000) {
                            values.put(Images.Media.DATE_TAKEN, time);
                        }
                    }