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

Commit 17f40fec authored by tibbi's avatar tibbi
Browse files

catch exceptions thrown at saving exif data

parent 81dd74ff
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.1.6'
        propVersionName = '4.1.7'
        kotlin_version = '1.2.41'
        support_libs = '27.1.1'
    }
+6 −1
Original line number Diff line number Diff line
package com.simplemobiletools.commons.extensions

import android.media.ExifInterface
import java.io.IOException

fun ExifInterface.copyTo(destination: ExifInterface) {
    val attributes = arrayOf(
@@ -34,5 +35,9 @@ fun ExifInterface.copyTo(destination: ExifInterface) {
            destination.setAttribute(it, value)
        }
    }

    try {
        destination.saveAttributes()
    } catch (ignored: IOException) {
    }
}