/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/ |
D | AudioRoutingManagerTest.java | 150 when(mA2dpService.setActiveDevice(any())).thenReturn(true); in setUp() 153 when(mHeadsetService.setActiveDevice(any())).thenReturn(true); in setUp() 154 when(mHearingAidService.setActiveDevice(any())).thenReturn(true); in setUp() 155 when(mLeAudioService.setActiveDevice(any())).thenReturn(true); in setUp() 182 verify(mA2dpService, never()).setActiveDevice(mA2dpDevice); in onlyA2dpConnected_setA2dpActiveShouldNotCalled() 189 verify(mA2dpService, never()).setActiveDevice(mA2dpHeadsetDevice); in a2dpHeadsetConnected_setA2dpActiveShouldBeCalledAfterHeadsetConnected() 193 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice); in a2dpHeadsetConnected_setA2dpActiveShouldBeCalledAfterHeadsetConnected() 194 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice); in a2dpHeadsetConnected_setA2dpActiveShouldBeCalledAfterHeadsetConnected() 202 verify(mA2dpService).setActiveDevice(mA2dpHeadsetDevice); in a2dpAndHfpConnectedAtTheSameTime_setA2dpActiveShouldNotBeCalled() 203 verify(mHeadsetService).setActiveDevice(mA2dpHeadsetDevice); in a2dpAndHfpConnectedAtTheSameTime_setA2dpActiveShouldNotBeCalled() [all …]
|
D | ActiveDeviceManagerTest.java | 154 when(mA2dpService.setActiveDevice(any())).thenReturn(true); in setUp() 157 when(mHeadsetService.setActiveDevice(any())).thenReturn(true); in setUp() 158 when(mHearingAidService.setActiveDevice(any())).thenReturn(true); in setUp() 159 when(mLeAudioService.setActiveDevice(any())).thenReturn(true); in setUp() 218 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpDevice); in onlyA2dpConnected_setA2dpActive() 226 verify(mA2dpService, after(TIMEOUT_MS).never()).setActiveDevice(mA2dpHeadsetDevice); in a2dpHeadsetConnected_setA2dpActiveShouldBeCalledAfterHeadsetConnected() 228 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice); in a2dpHeadsetConnected_setA2dpActiveShouldBeCalledAfterHeadsetConnected() 229 verify(mHeadsetService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice); in a2dpHeadsetConnected_setA2dpActiveShouldBeCalledAfterHeadsetConnected() 240 verify(mA2dpService).setActiveDevice(mA2dpHeadsetDevice); in a2dpAndHfpConnectedAtTheSameTime_setA2dpActiveShouldBeCalled() 241 verify(mHeadsetService).setActiveDevice(mA2dpHeadsetDevice); in a2dpAndHfpConnectedAtTheSameTime_setA2dpActiveShouldBeCalled() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/hfp/ |
D | HeadsetServiceAndStateMachineTest.java | 165 doReturn(true).when(mNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in setUp() 402 assertThat(mHeadsetService.setActiveDevice(activeDevice)).isTrue(); in testVirtualCall_normalStartStop() 404 verify(mNativeInterface).setActiveDevice(activeDevice); in testVirtualCall_normalStartStop() 441 assertThat(mHeadsetService.setActiveDevice(activeDevice)).isTrue(); in testVirtualCall_preemptedByTelecomCall() 443 verify(mNativeInterface).setActiveDevice(activeDevice); in testVirtualCall_preemptedByTelecomCall() 485 assertThat(mHeadsetService.setActiveDevice(activeDevice)).isTrue(); in testVirtualCall_rejectedWhenThereIsTelecomCall() 487 verify(mNativeInterface).setActiveDevice(activeDevice); in testVirtualCall_rejectedWhenThereIsTelecomCall() 514 assertThat(mHeadsetService.setActiveDevice(activeDevice)).isTrue(); in testDialingOutCall_NormalDialingOut() 516 verify(mNativeInterface).setActiveDevice(activeDevice); in testDialingOutCall_NormalDialingOut() 608 assertThat(mHeadsetService.setActiveDevice(activeDevice)).isTrue(); in testDialingOutCall_DialingOutPreemptVirtualCall() [all …]
|
D | HeadsetServiceTest.java | 150 doReturn(true).when(mNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in setUp() 516 Assert.assertTrue(mHeadsetService.setActiveDevice(mCurrentDevice)); in testConnectAudio_withOneDevice() 610 Assert.assertTrue(mHeadsetService.setActiveDevice(mCurrentDevice)); in testConnectAudio_withMultipleDevices() 711 Assert.assertTrue(mHeadsetService.setActiveDevice(firstDevice)); in testConnectAudio_connectTwoAudioChannelsShouldFail() 813 Assert.assertTrue(mHeadsetService.setActiveDevice(firstDevice)); in testConnectAudio_firstConnectedAudioDevice() 980 Assert.assertTrue(mHeadsetService.setActiveDevice(mCurrentDevice)); in testPhoneStateChange_oneDeviceSaveState() 1069 Assert.assertTrue(mHeadsetService.setActiveDevice(mCurrentDevice)); in testPhoneStateChange_multipleDevicesSaveState() 1178 Assert.assertTrue(mHeadsetService.setActiveDevice(mCurrentDevice)); in testSetSilenceMode() 1188 Assert.assertTrue(mHeadsetService.setActiveDevice(mCurrentDevice)); in testSetSilenceMode() 1212 Assert.assertTrue(mHeadsetService.setActiveDevice(null)); in testSetActiveDevice_AudioNotAllowed() [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | BluetoothDeviceManagerTest.java | 407 when(mAdapter.setActiveDevice(nullable(BluetoothDevice.class), in testConnectDisconnectAudioHeadset() 410 verify(mAdapter).setActiveDevice(eq(device1), in testConnectDisconnectAudioHeadset() 412 verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class), in testConnectDisconnectAudioHeadset() 426 when(mAdapter.setActiveDevice(nullable(BluetoothDevice.class), in testConnectDisconnectAudioHearingAid() 440 verify(mAdapter).setActiveDevice(device5, BluetoothAdapter.ACTIVE_DEVICE_ALL); in testConnectDisconnectAudioHearingAid() 442 verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class), in testConnectDisconnectAudioHearingAid() 461 when(mAdapter.setActiveDevice(nullable(BluetoothDevice.class), in testConnectDisconnectAudioLeAudio() 475 verify(mAdapter).setActiveDevice(device5, BluetoothAdapter.ACTIVE_DEVICE_ALL); in testConnectDisconnectAudioLeAudio() 477 verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class), in testConnectDisconnectAudioLeAudio() 479 verify(mAdapter, never()).setActiveDevice(nullable(BluetoothDevice.class), in testConnectDisconnectAudioLeAudio() [all …]
|
D | BluetoothRouteTransitionTests.java | 153 public BluetoothRouteTestParametersBuilder setActiveDevice(BluetoothDevice device) { in setActiveDevice() method in BluetoothRouteTransitionTests.BluetoothRouteTestParametersBuilder 457 .setActiveDevice(DEVICE1) in generateTestCases() 540 .setActiveDevice(DEVICE2) in generateTestCases() 698 .setActiveDevice(DEVICE2) in generateTestCases()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dp/ |
D | A2dpServiceBinderTest.java | 117 public void setActiveDevice() { in setActiveDevice() method in A2dpServiceBinderTest 120 mBinder.setActiveDevice(sDevice, sSource); in setActiveDevice() 121 verify(mA2dpService).setActiveDevice(sDevice); in setActiveDevice() 128 mBinder.setActiveDevice(sDevice, sSource); in setActiveDeviceWithAudioRouting() 136 mBinder.setActiveDevice(null, sSource); in setActiveDevice_withNull_callsRemoveActiveDevice()
|
D | A2dpServiceTest.java | 182 doReturn(true).when(mMockNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in testStopA2dpService() 184 assertThat(mA2dpService.setActiveDevice(sTestDevice)).isTrue(); in testStopA2dpService() 185 verify(mMockNativeInterface).setActiveDevice(sTestDevice); in testStopA2dpService() 191 verify(mMockNativeInterface).setActiveDevice(null); in testStopA2dpService() 753 doReturn(true).when(mMockNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in testSetSilenceMode() 759 assertThat(mA2dpService.setActiveDevice(sTestDevice)).isTrue(); in testSetSilenceMode() 771 assertThat(mA2dpService.setActiveDevice(sTestDevice)).isTrue(); in testSetSilenceMode() 786 assertThat(mA2dpService.setActiveDevice(null)).isFalse(); in testSetActiveDevice_withNull_returnsFalse() 796 doReturn(true).when(mMockNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in testRemoveActiveDevice_whenStopAudioIsFalse_suppressNoisyIntent() 797 assertThat(mA2dpService.setActiveDevice(sTestDevice)).isTrue(); in testRemoveActiveDevice_whenStopAudioIsFalse_suppressNoisyIntent() [all …]
|
/packages/apps/Settings/src/com/android/settings/sound/ |
D | HandsFreeProfileOutputPreferenceController.java | 173 hfpProfile.setActiveDevice(null); in setActiveBluetoothDevice() 174 hapProfile.setActiveDevice(null); in setActiveBluetoothDevice() 177 hapProfile.setActiveDevice(device); in setActiveBluetoothDevice() 179 hfpProfile.setActiveDevice(device); in setActiveBluetoothDevice()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcpcontroller/ |
D | AvrcpControllerService.java | 167 setActiveDevice(null); in start() 172 setActiveDevice(null); in stop() 210 boolean setActiveDevice(BluetoothDevice device) { in setActiveDevice() method in AvrcpControllerService 226 if (a2dpSinkService.setActiveDevice(device)) { in setActiveDevice() 286 setActiveDevice(device); in playItem() 340 setActiveDevice(device); in getContents() 458 setActiveDevice(device); in onConnectionStateChanged() 463 setActiveDevice(null); in onConnectionStateChanged() 717 setActiveDevice(null); in removeStateMachine()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/ |
D | AudioRoutingManager.java | 329 setActiveDevice(BluetoothProfile.HEADSET, d); in onModeChanged() 341 setActiveDevice(BluetoothProfile.A2DP, d); in onModeChanged() 535 isAnyProfileActivated |= setActiveDevice(p, routingDevice.device); in activateDeviceProfile() 558 private boolean setActiveDevice(int profile, BluetoothDevice device) { in setActiveDevice() method in AudioRoutingManager.AudioRoutingHandler 570 yield service == null ? false : service.setActiveDevice(device); in setActiveDevice() 574 yield service == null ? false : service.setActiveDevice(device); in setActiveDevice() 578 yield service == null ? false : service.setActiveDevice(device); in setActiveDevice() 582 yield service == null ? false : service.setActiveDevice(device); in setActiveDevice() 616 yield service == null ? false : service.setActiveDevice(null); in removeActiveDevice()
|
D | ActiveDeviceManager.java | 898 success = a2dpService.setActiveDevice(device); in setA2dpActiveDevice() 929 if (!headsetService.setActiveDevice(device)) { in setHfpActiveDevice() 970 if (!hearingAidService.setActiveDevice(device)) { in setHearingAidActiveDevice() 1008 success = leAudioService.setActiveDevice(device); in setLeAudioActiveDevice()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/le_audio/ |
D | LeAudioServiceTest.java | 1362 assertThat(mService.setActiveDevice(mSingleDevice)).isFalse(); in testSetActiveDeviceGroup() 1379 assertThat(mService.setActiveDevice(mSingleDevice)).isTrue(); in testSetActiveDeviceGroup() 1413 assertThat(mService.setActiveDevice(mSingleDevice)).isFalse(); in testSetActiveDeviceGroupTwice() 1430 assertThat(mService.setActiveDevice(mSingleDevice)).isTrue(); in testSetActiveDeviceGroupTwice() 1455 assertThat(mService.setActiveDevice(mSingleDevice)).isTrue(); in testSetActiveDeviceGroupTwice() 1477 assertThat(mService.setActiveDevice(mSingleDevice)).isFalse(); in testSetActiveDeviceGroupWithNoContextTypes() 1494 assertThat(mService.setActiveDevice(mSingleDevice)).isFalse(); in testSetActiveDeviceGroupWithNoContextTypes() 1511 assertThat(mService.setActiveDevice(mSingleDevice)).isFalse(); in testSwitchActiveGroups() 1543 assertThat(mService.setActiveDevice(mSingleDevice)).isTrue(); in testSwitchActiveGroups() 1572 assertThat(mService.setActiveDevice(mSingleDevice_2)).isTrue(); in testSwitchActiveGroups() [all …]
|
D | LeAudioBinderTest.java | 164 public void setActiveDevice() { in setActiveDevice() method in LeAudioBinderTest 169 mBinder.setActiveDevice(device, source); in setActiveDevice() 170 verify(mLeAudioService).setActiveDevice(device); in setActiveDevice() 173 mBinder.setActiveDevice(device, source); in setActiveDevice() 182 mBinder.setActiveDevice(null, source); in setActiveDevice_withNullDevice_callsRemoveActiveDevice() 186 mBinder.setActiveDevice(null, source); in setActiveDevice_withNullDevice_callsRemoveActiveDevice()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/ |
D | BluetoothHeadsetProxy.java | 82 public boolean setActiveDevice(BluetoothDevice device) { in setActiveDevice() method in BluetoothHeadsetProxy 83 return mBluetoothHeadset.setActiveDevice(device); in setActiveDevice()
|
D | HeadsetService.java | 794 public boolean setActiveDevice(BluetoothDevice device, AttributionSource source) { in setActiveDevice() method in HeadsetService.BluetoothHeadsetBinder 806 return service.setActiveDevice(device); in setActiveDevice() 913 setActiveDevice(null); in connect() 1127 if (!Objects.equals(device, mActiveDevice) && !setActiveDevice(device)) { in startVoiceRecognition() 1312 setActiveDevice(null); in setSilenceMode() 1315 setActiveDevice(device); in setSilenceMode() 1357 setActiveDevice(fallbackDevice); in removeActiveDevice() 1389 mNativeInterface.setActiveDevice(null); in removeActiveDevice() 1401 public boolean setActiveDevice(BluetoothDevice device) { in setActiveDevice() method in HeadsetService 1420 if (!mNativeInterface.setActiveDevice(device)) { in setActiveDevice() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/sound/ |
D | HandsFreeProfileOutputPreferenceControllerTest.java | 208 verify(mHearingAidProfile).setActiveDevice(mLeftBluetoothHapDevice); in setActiveBluetoothDevice_btDeviceWithHisyncId_shouldSetBtDeviceActive() 209 verify(mHeadsetProfile, never()).setActiveDevice(mLeftBluetoothHapDevice); in setActiveBluetoothDevice_btDeviceWithHisyncId_shouldSetBtDeviceActive() 222 verify(mHeadsetProfile).setActiveDevice(mBluetoothDevice); in setActiveBluetoothDevice_btDeviceWithoutHisyncId_shouldSetBtDeviceActive() 223 verify(mHearingAidProfile, never()).setActiveDevice(mBluetoothDevice); in setActiveBluetoothDevice_btDeviceWithoutHisyncId_shouldSetBtDeviceActive() 237 verify(mHeadsetProfile).setActiveDevice(null); in setActiveBluetoothDevice_setNull_shouldSetNullToBothProfiles() 238 verify(mHearingAidProfile).setActiveDevice(null); in setActiveBluetoothDevice_setNull_shouldSetNullToBothProfiles() 251 verify(mHeadsetProfile, times(0)).setActiveDevice(any(BluetoothDevice.class)); in setActiveBluetoothDevice_inNormalMode_shouldNotSetActiveDeviceToHeadsetProfile()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/ |
D | AvrcpControllerServiceTest.java | 112 when(mA2dpSinkService.setActiveDevice(any(BluetoothDevice.class))).thenReturn(true); in setUp() 165 assertThat(mService.setActiveDevice(mRemoteDevice)).isFalse(); in setActiveDevice_whenA2dpSinkServiceIsNotInitailized_returnsFalse() 525 verify(mA2dpSinkService).setActiveDevice(mRemoteDevice); in testActiveDeviceMaintainsAudioFocusWhenOtherDeviceConnects_audioFocusMaintained() 530 verify(mA2dpSinkService, times(0)).setActiveDevice(mRemoteDevice2); in testActiveDeviceMaintainsAudioFocusWhenOtherDeviceConnects_audioFocusMaintained() 535 verify(mA2dpSinkService, times(0)).setActiveDevice(mRemoteDevice2); in testActiveDeviceMaintainsAudioFocusWhenOtherDeviceConnects_audioFocusMaintained()
|
D | AvrcpControllerStateMachineTest.java | 148 setActiveDevice(mTestDevice); in setUp() 183 private void setActiveDevice(BluetoothDevice device) { in setActiveDevice() method in AvrcpControllerStateMachineTest 1233 setActiveDevice(null); in testIsActive_deviceInactive() 1245 setActiveDevice(null); in testBecomeActive() 1262 setActiveDevice(mTestDevice); in testBecomeActive() 1303 setActiveDevice(null); in testBecomeInactive() 1383 setActiveDevice(null); in testTrackChangeWhileNotActiveDevice() 1407 setActiveDevice(null); in testPlaybackWhileNotActiveDevice() 1435 setActiveDevice(null); in testPlayPositionChangeWhileNotActiveDevice() 1462 setActiveDevice(null); in testNowPlayingListChangeWhileNotActiveDevice()
|
/packages/services/Telecomm/src/com/android/server/telecom/bluetooth/ |
D | BluetoothDeviceManager.java | 801 if (mBluetoothAdapter.setActiveDevice( in connectAudio() 816 if (mBluetoothAdapter.setActiveDevice(device, BluetoothAdapter.ACTIVE_DEVICE_ALL)) { in connectAudio() 830 boolean success = mBluetoothAdapter.setActiveDevice(device, in connectAudio() 876 return mBluetoothAdapter.setActiveDevice(device, BluetoothAdapter.ACTIVE_DEVICE_ALL); in connectAudio() 878 boolean success = mBluetoothAdapter.setActiveDevice(device, in connectAudio() 912 mBluetoothAdapter.setActiveDevice(mBluetoothHearingAidActiveDeviceCache, in restoreHearingAidDevice()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkServiceTest.java | 104 doReturn(true).when(mNativeInterface).setActiveDevice(any()); in setUp() 246 assertThat(mService.setActiveDevice(mDevice1)).isTrue(); in testSetActiveDevice() 253 assertThat(mService.setActiveDevice(null)).isTrue(); in testSetActiveDeviceNullDevice()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/ |
D | A2dpService.java | 507 if (!mNativeInterface.setActiveDevice(null)) { in removeActiveDevice() 533 setActiveDevice(device); in setSilenceMode() 548 public boolean setActiveDevice(@NonNull BluetoothDevice device) { in setActiveDevice() method in A2dpService 600 if (!mNativeInterface.setActiveDevice(device)) { in setActiveDevice() 1335 setActiveDevice(device); in connectionStateChanged() 1456 public boolean setActiveDevice(BluetoothDevice device, AttributionSource source) { in setActiveDevice() method in A2dpService.BluetoothA2dpBinder 1470 return service.setActiveDevice(device); in setActiveDevice()
|
/packages/modules/Bluetooth/android/app/aidl/android/bluetooth/ |
D | IBluetoothHearingAid.aidl | 41 boolean setActiveDevice(in BluetoothDevice device, in AttributionSource attributionSource); in setActiveDevice() method
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcp/ |
D | AvrcpNativeInterface.java | 246 void setActiveDevice(String bdaddr) { in setActiveDevice() method in AvrcpNativeInterface 250 mAvrcpService.setActiveDevice(device); in setActiveDevice()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkNativeInterface.java | 121 public boolean setActiveDevice(BluetoothDevice device) { in setActiveDevice() method in A2dpSinkNativeInterface
|