Searched refs:mockAudioManager (Results 1 – 5 of 5) sorted by relevance
/packages/apps/Bluetooth/tests/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkStreamHandlerTest.java | 55 @Mock AudioManager mockAudioManager; field in A2dpSinkStreamHandlerTest 71 when(mockContext.getSystemService(Context.AUDIO_SERVICE)).thenReturn(mockAudioManager); in setUp() 74 when(mockAudioManager.requestAudioFocus(audioFocusChangeListenerArgumentCaptor.capture(), in setUp() 77 when(mockAudioManager.abandonAudioFocus(any())).thenReturn(AudioManager.AUDIOFOCUS_GAIN); in setUp() 89 verify(mockAudioManager, times(0)).requestAudioFocus(any(), anyInt(), anyInt()); in testSrcStart() 99 verify(mockAudioManager, times(0)).requestAudioFocus(any(), anyInt(), anyInt()); in testSrcStop() 108 verify(mockAudioManager, times(1)).requestAudioFocus(any(), anyInt(), anyInt()); in testSnkPlay() 117 verify(mockAudioManager, times(0)).requestAudioFocus(any(), anyInt(), anyInt()); in testSnkPause() 127 verify(mockAudioManager, times(1)).abandonAudioFocus(any()); in testDisconnect() 135 verify(mockAudioManager, times(0)).requestAudioFocus(any(), anyInt(), anyInt()); in testSrcPlay() [all …]
|
/packages/apps/Bluetooth/tests/src/com/android/bluetooth/hfpclient/ |
D | HeadsetClientStateMachineTest.java | 37 AudioManager mockAudioManager = mock(AudioManager.class); in testDefaultDisconnectedState() local 39 when(mockService.getSystemService(Context.AUDIO_SERVICE)).thenReturn(mockAudioManager); in testDefaultDisconnectedState() 50 AudioManager mockAudioManager = mock(AudioManager.class); in testIncomingPriorityReject() local 53 when(mockService.getSystemService(Context.AUDIO_SERVICE)).thenReturn(mockAudioManager); in testIncomingPriorityReject() 81 AudioManager mockAudioManager = mock(AudioManager.class); in testIncomingPriorityAccept() local 84 when(mockService.getSystemService(Context.AUDIO_SERVICE)).thenReturn(mockAudioManager); in testIncomingPriorityAccept() 86 when(mockAudioManager.getStreamVolume(anyInt())).thenReturn(2); in testIncomingPriorityAccept() 87 when(mockAudioManager.getStreamMaxVolume(anyInt())).thenReturn(10); in testIncomingPriorityAccept() 88 when(mockAudioManager.getStreamMinVolume(anyInt())).thenReturn(1); in testIncomingPriorityAccept() 140 AudioManager mockAudioManager = mock(AudioManager.class); in testIncomingTimeout() local [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | RingerTest.java | 58 AudioManager mockAudioManager; field in RingerTest 65 mockAudioManager = in setUp() 67 when(mockAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL); in setUp() 143 when(mockAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL); in testVibrateButNoRingForNullRingtone() 157 when(mockAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL); in testVibrateButNoRingForSilentRingtone() 158 when(mockAudioManager.getStreamVolume(AudioManager.STREAM_RING)).thenReturn(0); in testVibrateButNoRingForSilentRingtone() 184 when(mockAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL); in testSilentRingWithHfpStillAcquiresFocus1() 185 when(mockAudioManager.getStreamVolume(AudioManager.STREAM_RING)).thenReturn(0); in testSilentRingWithHfpStillAcquiresFocus1() 198 when(mockAudioManager.getRingerModeInternal()).thenReturn(AudioManager.RINGER_MODE_NORMAL); in testSilentRingWithHfpStillAcquiresFocus2() 199 when(mockAudioManager.getStreamVolume(AudioManager.STREAM_RING)).thenReturn(0); in testSilentRingWithHfpStillAcquiresFocus2() [all …]
|
D | CallAudioRouteStateMachineTest.java | 135 private AudioManager mockAudioManager; field in CallAudioRouteStateMachineTest 143 mockAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 188 when(mockAudioManager.isSpeakerphoneOn()).thenReturn(true); in testSpeakerPersistence() 193 when(mockAudioManager.isSpeakerphoneOn()).thenReturn((Boolean) args[0]); in testSpeakerPersistence() 196 }).when(mockAudioManager).setSpeakerphoneOn(any(Boolean.class)); in testSpeakerPersistence() 230 when(mockAudioManager.isSpeakerphoneOn()).thenReturn(true); in testUserBluetoothSwitchOff() 269 when(mockAudioManager.isSpeakerphoneOn()).thenReturn(false); in testBluetoothRinging() 300 when(mockAudioManager.isSpeakerphoneOn()).thenReturn(false); in testConnectBluetoothDuringRinging() 862 verify(mockAudioManager, never()).setSpeakerphoneOn(any(Boolean.class)); in runParametrizedTestCaseWithFocus() 866 verify(mockAudioManager).setSpeakerphoneOn(params.speakerInteraction == ON); in runParametrizedTestCaseWithFocus() [all …]
|
/packages/apps/Bluetooth/tests/src/com/android/bluetooth/avrcp/ |
D | AvrcpTest.java | 42 AudioManager mockAudioManager = mock(AudioManager.class); in testFailedBrowseStart() local 45 when(mockAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC)).thenReturn(100); in testFailedBrowseStart() 47 when(mockContext.getSystemService(Context.AUDIO_SERVICE)).thenReturn(mockAudioManager); in testFailedBrowseStart()
|