remove an error showing at saving photo

This commit is contained in:
tibbi 2018-01-13 09:29:08 +01:00
parent c3861299b2
commit c4b977517b
1 changed files with 1 additions and 4 deletions

View File

@ -96,17 +96,14 @@ class PhotoProcessor(val activity: MainActivity, val uri: Uri?, val currCameraId
if (path.startsWith(activity.internalStoragePath)) { if (path.startsWith(activity.internalStoragePath)) {
exifOrientation = getExifOrientation(totalRotation) exifOrientation = getExifOrientation(totalRotation)
} }
if (activity.config.savePhotoMetadata) if (activity.config.savePhotoMetadata)
tempExif.copyTo(fileExif) tempExif.copyTo(fileExif)
fileExif.setAttribute(ExifInterface.TAG_ORIENTATION, exifOrientation) fileExif.setAttribute(ExifInterface.TAG_ORIENTATION, exifOrientation)
fileExif.saveAttributes() fileExif.saveAttributes()
return photoFile.absolutePath return photoFile.absolutePath
} catch (e: FileNotFoundException) { } catch (e: FileNotFoundException) {
} catch (e: Exception) {
activity.showErrorToast(e)
} finally { } finally {
fos?.close() fos?.close()
} }