mirror of
https://github.com/SimpleMobileTools/Simple-Voice-Recorder.git
synced 2025-02-25 07:57:42 +01:00
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)
|
put(Media.DISPLAY_NAME, newDisplayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
activity.contentResolver.update(getAudioFileContentUri(recording.id.toLong()), values, null, null)
|
activity.contentResolver.update(getAudioFileContentUri(recording.id.toLong()), values, null, null)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
activity.showErrorToast(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateLegacyFilename(recording: Recording, newTitle: String) {
|
private fun updateLegacyFilename(recording: Recording, newTitle: String) {
|
||||||
|
@ -195,7 +195,10 @@ class RecorderService : Service() {
|
|||||||
private fun getAmplitudeUpdateTask() = object : TimerTask() {
|
private fun getAmplitudeUpdateTask() = object : TimerTask() {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (recorder != null) {
|
if (recorder != null) {
|
||||||
|
try {
|
||||||
EventBus.getDefault().post(Events.RecordingAmplitude(recorder!!.maxAmplitude))
|
EventBus.getDefault().post(Events.RecordingAmplitude(recorder!!.maxAmplitude))
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user