diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/Svg.kt b/app/src/main/kotlin/com/simplemobiletools/draw/Svg.kt index 0125f32..2919465 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/Svg.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/Svg.kt @@ -8,7 +8,6 @@ import java.io.* import java.util.* object Svg { - @Throws(Exception::class) fun saveSvg(output: File, canvas: MyCanvas) { val backgroundColor = (canvas.background as ColorDrawable).color @@ -18,7 +17,6 @@ object Svg { writer.close() } - @Throws(IOException::class) private fun writeSvg(writer: Writer, backgroundColor: Int, paths: Map, width: Int, height: Int) { writer.write("") } - @Throws(IOException::class) private fun writePath(writer: Writer, path: MyPath, options: PaintOptions) { writer.write("") } - @Throws(Exception::class) fun loadSvg(file: File, canvas: MyCanvas) { val svg = parseSvg(file) @@ -72,7 +68,6 @@ object Svg { } } - @Throws(Exception::class) private fun parseSvg(file: File): SSvg { var inputStream: InputStream? = null val svg = SSvg() diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/dialogs/SaveImageDialog.kt b/app/src/main/kotlin/com/simplemobiletools/draw/dialogs/SaveImageDialog.kt index 52eebfa..0f3c0d3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/dialogs/SaveImageDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/dialogs/SaveImageDialog.kt @@ -80,7 +80,6 @@ class SaveImageDialog(val activity: SimpleActivity, val curPath: String, val can try { out = FileOutputStream(file) canvas.getBitmap().compress(Bitmap.CompressFormat.PNG, 100, out) - activity.scanFile(file) {} } catch (e: Exception) { return false } finally { @@ -89,6 +88,7 @@ class SaveImageDialog(val activity: SimpleActivity, val curPath: String, val can } SVG -> Svg.saveSvg(file, canvas) } + activity.scanFile(file) {} return true } }