Merge pull request #443 from ltGuillaume/patch-1
Adding handleSAFDialog for EXIF rotation
This commit is contained in:
commit
6bc3e4cfa6
1 changed files with 32 additions and 30 deletions
|
@ -456,8 +456,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
val currPath = getCurrentPath()
|
val currPath = getCurrentPath()
|
||||||
SaveAsDialog(this, currPath, false) {
|
SaveAsDialog(this, currPath, false) {
|
||||||
Thread({
|
Thread({
|
||||||
toast(R.string.saving)
|
|
||||||
val selectedFile = File(it)
|
val selectedFile = File(it)
|
||||||
|
handleSAFDialog(selectedFile) {
|
||||||
|
toast(R.string.saving)
|
||||||
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue