mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-02-09 16:28:45 +01:00
fix #87, do not show "No valid app found" at sharing
This commit is contained in:
parent
61f1454d31
commit
faa62b29ea
@ -365,15 +365,18 @@ class MainActivity : SimpleActivity(), CanvasListener {
|
||||
val newPath = "$folder/$FILE_NAME"
|
||||
val fileDirItem = FileDirItem(newPath, FILE_NAME)
|
||||
getFileOutputStream(fileDirItem, true) {
|
||||
try {
|
||||
it?.write(bytes.toByteArray())
|
||||
callback(newPath)
|
||||
} catch (e: Exception) {
|
||||
} finally {
|
||||
it?.close()
|
||||
if (it != null) {
|
||||
try {
|
||||
it.write(bytes.toByteArray())
|
||||
callback(newPath)
|
||||
} catch (e: Exception) {
|
||||
} finally {
|
||||
it.close()
|
||||
}
|
||||
} else {
|
||||
callback("")
|
||||
}
|
||||
}
|
||||
callback("")
|
||||
}
|
||||
|
||||
private fun clearCanvas() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user