adding a crashfix

This commit is contained in:
tibbi 2021-02-11 13:12:54 +01:00
parent 9f612c2b65
commit 18186fe19c
3 changed files with 11 additions and 5 deletions

View File

@ -56,7 +56,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.33.22'
implementation 'com.simplemobiletools:commons:5.33.24'
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'com.github.Armen101:AudioRecordView:1.0.2'
implementation 'androidx.documentfile:documentfile:1.0.1'

View File

@ -179,9 +179,15 @@ class RecorderService : Service() {
}
val outputStream = contentResolver.openOutputStream(newUri)
val inputStream = getFileInputStreamSync(currFilePath)
inputStream!!.copyTo(outputStream!!, DEFAULT_BUFFER_SIZE)
recordingSavedSuccessfully(true)
try {
val inputStream = getFileInputStreamSync(currFilePath)
inputStream!!.copyTo(outputStream!!, DEFAULT_BUFFER_SIZE)
recordingSavedSuccessfully(true)
} catch (e: Exception) {
showErrorToast(e)
}
}
private fun addFileInLegacyMediaStore() {

View File

@ -1,5 +1,5 @@
<resources>
<style name="AppTheme" parent="AppTheme.Base"/>
<style name="AppTheme" parent="AppTheme.Base" />
</resources>