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

Commit a7bdedab authored by Chih-Chung Chang's avatar Chih-Chung Chang
Browse files

Fix 2081525: NPE in MediaScannerService.

Handle the case where the datetime string in jpeg exif is not in the format we expect.

Change-Id: I5462052c3dd723d01bce45f4924137632d081400
parent 33567c5f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -340,6 +340,7 @@ public class ExifInterface {
        ParsePosition pos = new ParsePosition(0);
        try {
            Date date = sFormatter.parse(dateTimeString, pos);
            if (date == null) return -1;
            return date.getTime();
        } catch (IllegalArgumentException ex) {
            return -1;