handle storage permission if saving a third party intent image

This commit is contained in:
tibbi 2018-01-23 22:58:09 +01:00
parent 76b85e611b
commit 15900f0506
1 changed files with 4 additions and 2 deletions

View File

@ -259,8 +259,10 @@ class MainActivity : SimpleActivity(), CanvasListener {
val outputStream = contentResolver.openOutputStream(intentUri) val outputStream = contentResolver.openOutputStream(intentUri)
saveToOutputStream(outputStream, file.getCompressionFormat()) saveToOutputStream(outputStream, file.getCompressionFormat())
} else { } else {
getFileOutputStream(file) { handlePermission(PERMISSION_WRITE_STORAGE) {
saveToOutputStream(it, file.getCompressionFormat()) getFileOutputStream(file) {
saveToOutputStream(it, file.getCompressionFormat())
}
} }
} }
} }