Home
last modified time | relevance | path

Searched refs:mMockAudioManager (Results 1 – 6 of 6) sorted by relevance

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DCarAudioFocusUnitTest.java76 private AudioManager mMockAudioManager; field in CarAudioFocusUnitTest
98 verify(mMockAudioManager).setFocusRequestResult(audioFocusInfo, in onAudioFocusRequest_withNoCurrentFocusHolder_requestGranted()
111 verify(mMockAudioManager, times(2)).setFocusRequestResult(sameClientAndUsageFocusInfo, in onAudioFocusRequest_withSameClientIdSameUsage_requestGranted()
124 verify(mMockAudioManager).setFocusRequestResult(sameClientFocusInfo, in onAudioFocusRequest_withSameClientIdDifferentUsage_requestFailed()
136 verify(mMockAudioManager).setFocusRequestResult(concurrentFocusInfo, in onAudioFocusRequest_concurrentRequest_requestGranted()
148 verify(mMockAudioManager).dispatchAudioFocusChange(initialFocusInfo, in onAudioFocusRequest_concurrentRequestWithoutDucking_holderLosesFocus()
160 verify(mMockAudioManager, times(0)).dispatchAudioFocusChange(eq(initialFocusInfo), in onAudioFocusRequest_concurrentRequestMayDuck_holderRetainsFocus()
172 verify(mMockAudioManager).setFocusRequestResult(exclusiveRequestInfo, in onAudioFocusRequest_exclusiveRequest_requestGranted()
184 verify(mMockAudioManager).dispatchAudioFocusChange(initialFocusInfo, in onAudioFocusRequest_exclusiveRequest_holderLosesFocus()
196 verify(mMockAudioManager).dispatchAudioFocusChange(initialFocusInfo, in onAudioFocusRequest_exclusiveRequestMayDuck_holderLosesFocusTransiently()
[all …]
DCarAudioPolicyVolumeCallbackTest.java65 AudioManager mMockAudioManager; field in CarAudioPolicyVolumeCallbackTest
74 new CarAudioPolicyVolumeCallback(mMockCarAudioService, mMockAudioManager, false); in setUp()
89 null, mMockCarAudioService, mMockAudioManager, false)); in addVolumeCallbackToPolicy_withNullPolicyBuilder_fails()
96 null, mMockAudioManager, false)); in addVolumeCallbackToPolicy_withNullCarAudioService_fails()
110 mMockCarAudioService, mMockAudioManager, false); in addVolumeCallbackToPolicy_registersVolumePolicy()
181 when(mMockAudioManager.isMasterMute()).thenReturn(true); in onVolumeAdjustment_withToggleMute_whileMuted_unMutesMasterVolume()
190 when(mMockAudioManager.isMasterMute()).thenReturn(false); in onVolumeAdjustment_withToggleMute_whileUnMuted_mutesMasterVolume()
200 new CarAudioPolicyVolumeCallback(mMockCarAudioService, mMockAudioManager, true); in onVolumeAdjustment_forGroupMute_withAdjustMute_mutesVolumeGroup()
213 new CarAudioPolicyVolumeCallback(mMockCarAudioService, mMockAudioManager, true); in onVolumeAdjustment_forGroupMute_withAdjustToggleMute_togglesMutesVolumeGroup()
225 new CarAudioPolicyVolumeCallback(mMockCarAudioService, mMockAudioManager, true); in onVolumeAdjustment_forGroupMute_withAdjustUnMute_UnMutesVolumeGroup()
DCarZonesAudioFocusUnitTest.java64 private AudioManager mMockAudioManager; field in CarZonesAudioFocusUnitTest
95 () -> CarZonesAudioFocus.createCarZonesAudioFocus(mMockAudioManager, in newCarZonesAudioFocus_withNullPackageManager_throws()
103 () -> CarZonesAudioFocus.createCarZonesAudioFocus(mMockAudioManager, in newCarZonesAudioFocus_withNullCarAudioZones_throws()
111 () -> CarZonesAudioFocus.createCarZonesAudioFocus(mMockAudioManager, in newCarZonesAudioFocus_withEmptyCarAudioZones_throws()
120 () -> CarZonesAudioFocus.createCarZonesAudioFocus(mMockAudioManager, in newCarZonesAudioFocus_withNullCarAudioSettings_throws()
127 CarZonesAudioFocus.createCarZonesAudioFocus(mMockAudioManager, mMockPackageManager, in newCarZonesAudioFocus_withNullCarFocusCallback_succeeds()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dpsink/
DA2dpSinkStreamHandlerTest.java53 @Mock private AudioManager mMockAudioManager; field in A2dpSinkStreamHandlerTest
73 when(mMockContext.getSystemService(Context.AUDIO_SERVICE)).thenReturn(mMockAudioManager); in setUp()
76 when(mMockAudioManager.requestAudioFocus(any())).thenReturn( in setUp()
78 when(mMockAudioManager.abandonAudioFocus(any())).thenReturn(AudioManager.AUDIOFOCUS_GAIN); in setUp()
92 verify(mMockAudioManager, times(0)).requestAudioFocus(any()); in testSrcStart()
102 verify(mMockAudioManager, times(0)).requestAudioFocus(any()); in testSrcStop()
111 verify(mMockAudioManager, times(1)).requestAudioFocus(any()); in testSnkPlay()
120 verify(mMockAudioManager, times(0)).requestAudioFocus(any()); in testSnkPause()
131 verify(mMockAudioManager, times(0)).abandonAudioFocus(any()); in testDisconnect()
139 verify(mMockAudioManager, times(0)).requestAudioFocus(any()); in testSrcPlay()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/hal/
DHalAudioFocusTest.java70 AudioManager mMockAudioManager; field in HalAudioFocusTest
78 mHalAudioFocus = new HalAudioFocus(mMockAudioManager, mAudioControlWrapper, AUDIO_ZONE_IDS); in setUp()
157 verify(mMockAudioManager, never()).abandonAudioFocusRequest(firstRequest); in requestAudioFocus_withSameZoneAndUsage_keepsExistingRequest()
186 verify(mMockAudioManager, never()).abandonAudioFocusRequest(firstRequest); in requestAudioFocus_withDifferentZoneAndSameUsage_keepsExistingRequest()
197 verify(mMockAudioManager, never()).abandonAudioFocusRequest(firstRequest); in requestAudioFocus_withSameZoneAndDifferentUsage_keepsExistingRequest()
202 when(mMockAudioManager.requestAudioFocus(any())).thenReturn(AUDIOFOCUS_REQUEST_FAILED, in requestAudioFocus_withPreviouslyFailedRequest_doesNothingForOldRequest()
209 verify(mMockAudioManager, never()).abandonAudioFocusRequest(firstRequest); in requestAudioFocus_withPreviouslyFailedRequest_doesNothingForOldRequest()
234 verify(mMockAudioManager, never()).abandonAudioFocusRequest(any()); in abandonAudioFocus_withNoCurrentRequest_doesNothing()
253 verify(mMockAudioManager).abandonAudioFocusRequest(actualRequest); in abandonAudioFocus_withCurrentRequest_abandonsExistingFocus()
261 when(mMockAudioManager.abandonAudioFocusRequest(actualRequest)).thenReturn( in abandonAudioFocus_withCurrentRequest_notifiesHalOfFocusChange()
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/audio/
DCarZonesAudioFocusTest.java74 private AudioManager mMockAudioManager; field in CarZonesAudioFocusTest
103 verify(mMockAudioManager, never()) in onAudioFocusRequest_withNoCurrentFocusHolder_requestGranted()
122 verify(mMockAudioManager, never()) in onAudioFocusRequest_forTwoDifferentZones_requestGranted()
125 verify(mMockAudioManager, never()) in onAudioFocusRequest_forTwoDifferentZones_requestGranted()
145 verify(mMockAudioManager, never()) in onAudioFocusRequest_forTwoDifferentZones_abandonInOne_requestGranted()
148 verify(mMockAudioManager, never()) in onAudioFocusRequest_forTwoDifferentZones_abandonInOne_requestGranted()
166 verify(mMockAudioManager, never()) in onAudioFocusRequest_withBundleFocusRequest_requestGranted()
185 verify(mMockAudioManager) in onAudioFocusRequest_repeatForSameZone_requestGranted()
189 verify(mMockAudioManager, never()) in onAudioFocusRequest_repeatForSameZone_requestGranted()
219 verify(mMockAudioManager).setFocusRequestResult(audioFocusInfoNavClient, in onAudioFocusRequest_forNavigationWhileOnCall_rejectNavOnCall_requestFailed()
[all …]