catch IOException at setting photo exif data separately so the code continues
This commit is contained in:
parent
c3e8ce8894
commit
3152b545e9
|
@ -15,10 +15,7 @@ import com.simplemobiletools.camera.extensions.config
|
||||||
import com.simplemobiletools.camera.extensions.getOutputMediaFile
|
import com.simplemobiletools.camera.extensions.getOutputMediaFile
|
||||||
import com.simplemobiletools.camera.extensions.getPreviewRotation
|
import com.simplemobiletools.camera.extensions.getPreviewRotation
|
||||||
import com.simplemobiletools.commons.extensions.*
|
import com.simplemobiletools.commons.extensions.*
|
||||||
import java.io.File
|
import java.io.*
|
||||||
import java.io.FileNotFoundException
|
|
||||||
import java.io.FileOutputStream
|
|
||||||
import java.io.OutputStream
|
|
||||||
|
|
||||||
class PhotoProcessor(val activity: MainActivity, val uri: Uri?, val currCameraId: Int, val deviceOrientation: Int) : AsyncTask<ByteArray, Void, String>() {
|
class PhotoProcessor(val activity: MainActivity, val uri: Uri?, val currCameraId: Int, val deviceOrientation: Int) : AsyncTask<ByteArray, Void, String>() {
|
||||||
|
|
||||||
|
@ -101,7 +98,10 @@ class PhotoProcessor(val activity: MainActivity, val uri: Uri?, val currCameraId
|
||||||
tempExif.copyTo(fileExif)
|
tempExif.copyTo(fileExif)
|
||||||
|
|
||||||
fileExif.setAttribute(ExifInterface.TAG_ORIENTATION, exifOrientation)
|
fileExif.setAttribute(ExifInterface.TAG_ORIENTATION, exifOrientation)
|
||||||
fileExif.saveAttributes()
|
try {
|
||||||
|
fileExif.saveAttributes()
|
||||||
|
} catch (e: IOException) {
|
||||||
|
}
|
||||||
return photoFile.absolutePath
|
return photoFile.absolutePath
|
||||||
} catch (e: FileNotFoundException) {
|
} catch (e: FileNotFoundException) {
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue