set willPausedWhenDucked to true for RecordVoiceMessage

per review feedback - need true here so the onFocusLost callback
actually fires on all Android versions

Signed-off-by: vmfunc <celeste@linux.com>
This commit is contained in:
vmfunc 2026-02-12 19:50:11 +01:00
parent bddc5a63f4
commit 73a3468dbc

View file

@ -100,10 +100,8 @@ private fun AudioFocusRequester.willPausedWhenDucked(): Boolean {
return when (this) { return when (this) {
// (note that for Element Call, there is no action when the focus is lost) // (note that for Element Call, there is no action when the focus is lost)
AudioFocusRequester.ElementCall, AudioFocusRequester.ElementCall,
AudioFocusRequester.VoiceMessage -> true AudioFocusRequester.VoiceMessage,
// no audio output to duck when recording, and we don't want notification AudioFocusRequester.RecordVoiceMessage -> true
// sounds to interrupt a recording via transient focus loss
AudioFocusRequester.RecordVoiceMessage -> false
// For the MediaViewer, we let the system automatically handle the ducking // For the MediaViewer, we let the system automatically handle the ducking
// https://developer.android.com/media/optimize/audio-focus#automatic-ducking // https://developer.android.com/media/optimize/audio-focus#automatic-ducking
AudioFocusRequester.MediaViewer -> false AudioFocusRequester.MediaViewer -> false