mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-02-03 10:17:29 +01:00
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…
x
Reference in New Issue
Block a user