mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
update commons to 2.27.8
This commit is contained in:
@@ -172,7 +172,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||
|
||||
try {
|
||||
getFileOutputStream(file) {
|
||||
saveBitmap(file, bitmap, it)
|
||||
if (it != null) {
|
||||
saveBitmap(file, bitmap, it)
|
||||
} else {
|
||||
toast(R.string.image_editing_failed)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Crop compressing failed $path $e")
|
||||
|
@@ -418,6 +418,12 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||
try {
|
||||
val bitmap = BitmapFactory.decodeFile(currPath)
|
||||
getFileOutputStream(tmpFile) {
|
||||
if (it == null) {
|
||||
toast(R.string.unknown_error_occurred)
|
||||
deleteFile(tmpFile) {}
|
||||
return@getFileOutputStream
|
||||
}
|
||||
|
||||
saveFile(tmpFile, bitmap, it)
|
||||
if (needsStupidWritePermissions(selectedFile.absolutePath)) {
|
||||
deleteFile(selectedFile) {}
|
||||
|
Reference in New Issue
Block a user