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

Commit c8f9c085 authored by tibbi's avatar tibbi
Browse files

check file exif date_time_original before date_time

parent 8c869b2b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '4.6.13'
        propVersionName = '4.6.14'
        kotlin_version = '1.2.60'
        support_libs = '27.1.1'
    }
+2 −1
Original line number Diff line number Diff line
@@ -102,7 +102,8 @@ fun String.getExifProperties(exif: ExifInterface): String {
}

fun String.getExifDateTaken(exif: ExifInterface): String {
    exif.getAttribute(ExifInterface.TAG_DATETIME).let {
    val dateTime = exif.getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL) ?: exif.getAttribute(ExifInterface.TAG_DATETIME)
    dateTime.let {
        if (it?.isNotEmpty() == true) {
            try {
                val simpleDateFormat = SimpleDateFormat("yyyy:MM:dd kk:mm:ss", Locale.ENGLISH)