mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-09-20 00:35:47 +01:00
Fix voice note volume ducking.
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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 }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user