mirror of
https://github.com/SimpleMobileTools/Simple-Draw.git
synced 2025-02-10 08:40:36 +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 newPath = "$folder/$FILE_NAME"
|
||||||
val fileDirItem = FileDirItem(newPath, FILE_NAME)
|
val fileDirItem = FileDirItem(newPath, FILE_NAME)
|
||||||
getFileOutputStream(fileDirItem, true) {
|
getFileOutputStream(fileDirItem, true) {
|
||||||
try {
|
if (it != null) {
|
||||||
it?.write(bytes.toByteArray())
|
try {
|
||||||
callback(newPath)
|
it.write(bytes.toByteArray())
|
||||||
} catch (e: Exception) {
|
callback(newPath)
|
||||||
} finally {
|
} catch (e: Exception) {
|
||||||
it?.close()
|
} finally {
|
||||||
|
it.close()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
callback("")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
callback("")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun clearCanvas() {
|
private fun clearCanvas() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user