marking the playback tracker as idle when the voice recording stops

- fixes missing EndkeepScreenOn
This commit is contained in:
Adam Brown 2021-11-25 14:49:11 +00:00
parent 28af0a637f
commit 9e9116df2f
1 changed files with 2 additions and 0 deletions

View File

@ -74,6 +74,7 @@ class VoiceMessageHelper @Inject constructor(
voiceRecorder.stopRecord() voiceRecorder.stopRecord()
voiceRecorder.getVoiceMessageFile() voiceRecorder.getVoiceMessageFile()
} }
try { try {
voiceMessageFile?.let { voiceMessageFile?.let {
val outputFileUri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".fileProvider", it, "Voice message.${it.extension}") val outputFileUri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".fileProvider", it, "Voice message.${it.extension}")
@ -153,6 +154,7 @@ class VoiceMessageHelper @Inject constructor(
} }
fun stopPlayback() { fun stopPlayback() {
playbackTracker.stopPlayback(VoiceMessagePlaybackTracker.RECORDING_ID)
mediaPlayer?.stop() mediaPlayer?.stop()
stopPlaybackTicker() stopPlaybackTicker()
} }