moving outputstream creating to try/catch block

This commit is contained in:
tibbi 2021-03-05 21:02:43 +01:00
parent 199c551e29
commit de557ff618
1 changed files with 1 additions and 3 deletions

View File

@ -180,10 +180,8 @@ class RecorderService : Service() {
return
}
val outputStream = contentResolver.openOutputStream(newUri)
try {
val outputStream = contentResolver.openOutputStream(newUri)
val inputStream = getFileInputStreamSync(currFilePath)
inputStream!!.copyTo(outputStream!!, DEFAULT_BUFFER_SIZE)
recordingSavedSuccessfully(true)