moving outputstream creating to try/catch block
This commit is contained in:
parent
199c551e29
commit
de557ff618
|
@ -180,10 +180,8 @@ class RecorderService : Service() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val outputStream = contentResolver.openOutputStream(newUri)
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
val outputStream = contentResolver.openOutputStream(newUri)
|
||||||
val inputStream = getFileInputStreamSync(currFilePath)
|
val inputStream = getFileInputStreamSync(currFilePath)
|
||||||
inputStream!!.copyTo(outputStream!!, DEFAULT_BUFFER_SIZE)
|
inputStream!!.copyTo(outputStream!!, DEFAULT_BUFFER_SIZE)
|
||||||
recordingSavedSuccessfully(true)
|
recordingSavedSuccessfully(true)
|
||||||
|
|
Loading…
Reference in New Issue