Fix voice note volume ducking.

This commit is contained in:
Michelle Tang
2026-09-02 16:11:31 -03:00
committed by Alex Hart
parent 918a2a5982
commit adbcf6e2f3
2 changed files with 2 additions and 2 deletions
@@ -209,7 +209,7 @@ class VoiceNotePlayerCallback(val context: Context, val player: VoiceNotePlayer)
}
player.playWhenReady = false
player.setAudioAttributes(attributes, newStreamType == AudioManager.STREAM_MUSIC)
player.setAudioAttributes(attributes, false)
if (newStreamType == AudioManager.STREAM_VOICE_CALL) {
player.playWhenReady = true
} else {
@@ -60,7 +60,7 @@ class VoiceNotePlayerCallbackTest {
// THEN
verify { player.playWhenReady = false }
verify { player.setAudioAttributes(expected, true) }
verify { player.setAudioAttributes(expected, false) }
verify(exactly = 0) { player.playWhenReady = true }
}