catch and show exceptions thrown at cropping third party intents

This commit is contained in:
tibbi 2022-06-05 22:55:04 +02:00
parent 550f42f110
commit 45844439dd

View file

@ -794,6 +794,9 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
inputStream = ByteArrayInputStream(stream.toByteArray()) inputStream = ByteArrayInputStream(stream.toByteArray())
outputStream = contentResolver.openOutputStream(saveUri) outputStream = contentResolver.openOutputStream(saveUri)
inputStream.copyTo(outputStream!!) inputStream.copyTo(outputStream!!)
} catch (e: Exception) {
showErrorToast(e)
return
} finally { } finally {
inputStream?.close() inputStream?.close()
outputStream?.close() outputStream?.close()