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
1 changed files with 3 additions and 0 deletions

View File

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