adding some crashfixes
This commit is contained in:
parent
d3abe3906d
commit
236ad77fce
|
@ -63,7 +63,11 @@ class RenameRecordingDialog(val activity: BaseSimpleActivity, val recording: Rec
|
|||
put(Media.DISPLAY_NAME, newDisplayName)
|
||||
}
|
||||
|
||||
activity.contentResolver.update(getAudioFileContentUri(recording.id.toLong()), values, null, null)
|
||||
try {
|
||||
activity.contentResolver.update(getAudioFileContentUri(recording.id.toLong()), values, null, null)
|
||||
} catch (e: Exception) {
|
||||
activity.showErrorToast(e)
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateLegacyFilename(recording: Recording, newTitle: String) {
|
||||
|
|
|
@ -195,7 +195,10 @@ class RecorderService : Service() {
|
|||
private fun getAmplitudeUpdateTask() = object : TimerTask() {
|
||||
override fun run() {
|
||||
if (recorder != null) {
|
||||
EventBus.getDefault().post(Events.RecordingAmplitude(recorder!!.maxAmplitude))
|
||||
try {
|
||||
EventBus.getDefault().post(Events.RecordingAmplitude(recorder!!.maxAmplitude))
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue