mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
Always do resize operation on background thread
This commit is contained in:
@ -823,6 +823,7 @@ fun BaseSimpleActivity.launchResizeImageDialog(path: String, callback: (() -> Un
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun BaseSimpleActivity.resizeImage(path: String, size: Point, callback: (success: Boolean) -> Unit) {
|
fun BaseSimpleActivity.resizeImage(path: String, size: Point, callback: (success: Boolean) -> Unit) {
|
||||||
|
ensureBackgroundThread {
|
||||||
var oldExif: ExifInterface? = null
|
var oldExif: ExifInterface? = null
|
||||||
if (isNougatPlus()) {
|
if (isNougatPlus()) {
|
||||||
val inputStream = contentResolver.openInputStream(Uri.fromFile(File(path)))
|
val inputStream = contentResolver.openInputStream(Uri.fromFile(File(path)))
|
||||||
@ -853,6 +854,7 @@ fun BaseSimpleActivity.resizeImage(path: String, size: Point, callback: (success
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun BaseSimpleActivity.rescanPathsAndUpdateLastModified(paths: ArrayList<String>) {
|
fun BaseSimpleActivity.rescanPathsAndUpdateLastModified(paths: ArrayList<String>) {
|
||||||
rescanPaths(paths) {
|
rescanPaths(paths) {
|
||||||
|
Reference in New Issue
Block a user