update commons to 2.27.8

This commit is contained in:
tibbi
2017-09-04 20:08:07 +02:00
parent 25070ab2d4
commit 619647b16a
3 changed files with 12 additions and 2 deletions

View File

@@ -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")

View File

@@ -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) {}