mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 12:17:22 +00:00
Update ExoPlayer to 2.18.1
This commit is contained in:
@@ -5,7 +5,6 @@ import android.media.AudioManager
|
||||
import android.os.Bundle
|
||||
import android.support.v4.media.session.MediaSessionCompat
|
||||
import com.google.android.exoplayer2.C
|
||||
import com.google.android.exoplayer2.ControlDispatcher
|
||||
import com.google.android.exoplayer2.SimpleExoPlayer
|
||||
import com.google.android.exoplayer2.audio.AudioAttributes
|
||||
import org.junit.Test
|
||||
@@ -27,7 +26,6 @@ class VoiceNotePlaybackControllerTest {
|
||||
private val playbackParameters = VoiceNotePlaybackParameters(mediaSessionCompat)
|
||||
private val mediaAudioAttributes = AudioAttributes.Builder().setContentType(C.CONTENT_TYPE_MUSIC).setUsage(C.USAGE_MEDIA).build()
|
||||
private val callAudioAttributes = AudioAttributes.Builder().setContentType(C.CONTENT_TYPE_SPEECH).setUsage(C.USAGE_VOICE_COMMUNICATION).build()
|
||||
private val controlDispatcher = mock(ControlDispatcher::class.java)
|
||||
private val player: SimpleExoPlayer = mock(SimpleExoPlayer::class.java)
|
||||
private val testSubject = VoiceNotePlaybackController(player, playbackParameters)
|
||||
|
||||
@@ -41,7 +39,7 @@ class VoiceNotePlaybackControllerTest {
|
||||
val expected = callAudioAttributes
|
||||
|
||||
// WHEN
|
||||
testSubject.onCommand(player, controlDispatcher, command, extras, null)
|
||||
testSubject.onCommand(player, command, extras, null)
|
||||
|
||||
// THEN
|
||||
verify(player).playWhenReady = false
|
||||
@@ -59,7 +57,7 @@ class VoiceNotePlaybackControllerTest {
|
||||
val expected = mediaAudioAttributes
|
||||
|
||||
// WHEN
|
||||
testSubject.onCommand(player, controlDispatcher, command, extras, null)
|
||||
testSubject.onCommand(player, command, extras, null)
|
||||
|
||||
// THEN
|
||||
verify(player).playWhenReady = false
|
||||
@@ -76,7 +74,7 @@ class VoiceNotePlaybackControllerTest {
|
||||
val extras = Bundle().apply { putInt(VoiceNotePlaybackService.ACTION_SET_AUDIO_STREAM, AudioManager.STREAM_VOICE_CALL) }
|
||||
|
||||
// WHEN
|
||||
testSubject.onCommand(player, controlDispatcher, command, extras, null)
|
||||
testSubject.onCommand(player, command, extras, null)
|
||||
|
||||
// THEN
|
||||
verify(player, Mockito.never()).playWhenReady = anyBoolean()
|
||||
@@ -92,7 +90,7 @@ class VoiceNotePlaybackControllerTest {
|
||||
val extras = Bundle().apply { putInt(VoiceNotePlaybackService.ACTION_SET_AUDIO_STREAM, AudioManager.STREAM_MUSIC) }
|
||||
|
||||
// WHEN
|
||||
testSubject.onCommand(player, controlDispatcher, command, extras, null)
|
||||
testSubject.onCommand(player, command, extras, null)
|
||||
|
||||
// THEN
|
||||
verify(player, Mockito.never()).playWhenReady = anyBoolean()
|
||||
|
||||
Reference in New Issue
Block a user