handle storage permission if saving a third party intent image
This commit is contained in:
parent
76b85e611b
commit
15900f0506
|
@ -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())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue