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

@ -37,7 +37,7 @@ android {
}
dependencies {
compile 'com.simplemobiletools:commons:2.26.9'
compile 'com.simplemobiletools:commons:2.27.8'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'

View file

@ -172,7 +172,11 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
try {
getFileOutputStream(file) {
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) {}