Adding handleSAFDialog for EXIF rotation

This commit is contained in:
Guillaume 2017-11-07 23:08:20 +01:00 committed by GitHub
parent fef04593ac
commit 9a90787dbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -458,6 +458,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
Thread({ Thread({
toast(R.string.saving) toast(R.string.saving)
val selectedFile = File(it) val selectedFile = File(it)
handleSAFDialog(selectedFile) {
val tmpFile = File(filesDir, ".tmp_${it.getFilenameFromPath()}") val tmpFile = File(filesDir, ".tmp_${it.getFilenameFromPath()}")
try { try {
val bitmap = BitmapFactory.decodeFile(currPath) val bitmap = BitmapFactory.decodeFile(currPath)
@ -492,6 +493,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
} finally { } finally {
deleteFile(tmpFile) {} deleteFile(tmpFile) {}
} }
}
}).start() }).start()
} }
} }