/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dp/ |
D | A2dpServiceTest.java | 67 private A2dpService mA2dpService; field in A2dpServiceTest 102 mA2dpService.mA2dpNativeInterface = mA2dpNativeInterface; in setUp() 138 mA2dpService = A2dpService.getA2dpService(); in startService() 139 Assert.assertNotNull(mA2dpService); in startService() 144 mA2dpService = A2dpService.getA2dpService(); in stopService() 145 Assert.assertNull(mA2dpService); in stopService() 229 Assert.assertEquals(mA2dpService, A2dpService.getA2dpService()); in testGetA2dpService() 240 Assert.assertTrue(mA2dpService.setActiveDevice(mTestDevice)); in testStopA2dpService() 245 Assert.assertTrue(mA2dpService.stop()); in testStopA2dpService() 253 Assert.assertTrue(mA2dpService.start()); in testStopA2dpService() [all …]
|
D | A2dpStateMachineTest.java | 64 @Mock private A2dpService mA2dpService; field in A2dpStateMachineTest 100 mA2dpStateMachine = new A2dpStateMachine(mTestDevice, mA2dpService, in setUp() 132 doReturn(allow).when(mA2dpService).okToConnect(any(BluetoothDevice.class), in allowConnection() 151 verify(mA2dpService, after(TIMEOUT_MS).never()).sendBroadcast(any(Intent.class), in testIncomingPriorityReject() 174 verify(mA2dpService, timeout(TIMEOUT_MS).times(1)).sendBroadcast(intentArgument1.capture(), in testIncomingPriorityAccept() 194 verify(mA2dpService, timeout(TIMEOUT_MS).times(3)).sendBroadcast(intentArgument2.capture(), in testIncomingPriorityAccept() 221 verify(mA2dpService, timeout(TIMEOUT_MS).times(1)).sendBroadcast(intentArgument1.capture(), in testOutgoingTimeout() 232 verify(mA2dpService, timeout(A2dpStateMachine.sConnectTimeoutMs * 2).times( in testOutgoingTimeout() 260 verify(mA2dpService, timeout(TIMEOUT_MS).times(1)).sendBroadcast(intentArgument1.capture(), in testIncomingTimeout() 271 verify(mA2dpService, timeout(A2dpStateMachine.sConnectTimeoutMs * 2).times( in testIncomingTimeout() [all …]
|
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/ |
D | PhonePolicyTest.java | 66 @Mock private A2dpService mA2dpService; field in PhonePolicyTest 74 when(mA2dpService.connect(any(BluetoothDevice.class))).thenReturn(true); in setUp() 82 doReturn(mA2dpService).when(mServiceFactory).getA2dpService(); in setUp() 115 when(mA2dpService.getConnectionPolicy(device)) in testProcessInitProfilePriorities() 158 when(mA2dpService.getConnectionPolicy(bondedDevice)).thenReturn( in testAdapterOnAutoConnect() 167 verify(mA2dpService, timeout(ASYNC_CALL_TIMEOUT_MILLIS)).connect(eq(bondedDevice)); in testAdapterOnAutoConnect() 246 when(mA2dpService.getConnectionState(connectionOrder.get(1))).thenReturn( in testDisconnectNoAutoConnect() 275 when(mA2dpService.getConnectionPolicy(bondedDevices[0])).thenReturn( in testReconnectOnPartialConnect() 287 when(mA2dpService.getConnectionState(bondedDevices[0])).thenReturn( in testReconnectOnPartialConnect() 296 verify(mA2dpService, timeout(CONNECT_OTHER_PROFILES_TIMEOUT_WAIT_MILLIS)).connect( in testReconnectOnPartialConnect() [all …]
|
D | ActiveDeviceManagerTest.java | 64 @Mock private A2dpService mA2dpService; field in ActiveDeviceManagerTest 81 when(mServiceFactory.getA2dpService()).thenReturn(mA2dpService); in setUp() 84 when(mA2dpService.setActiveDevice(any())).thenReturn(true); in setUp() 118 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpDevice); in onlyA2dpConnected_setA2dpActive() 127 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpDevice); in secondA2dpConnected_setSecondA2dpActive() 130 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice); in secondA2dpConnected_setSecondA2dpActive() 139 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpDevice); in lastA2dpDisconnected_clearA2dpActive() 142 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(isNull()); in lastA2dpDisconnected_clearA2dpActive() 151 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpDevice); in a2dpActiveDeviceSelected_setActive() 154 verify(mA2dpService, timeout(TIMEOUT_MS)).setActiveDevice(mA2dpHeadsetDevice); in a2dpActiveDeviceSelected_setActive() [all …]
|
D | SilenceDeviceManagerTest.java | 63 @Mock private A2dpService mA2dpService; field in SilenceDeviceManagerTest 74 when(mServiceFactory.getA2dpService()).thenReturn(mA2dpService); in setUp() 108 doReturn(true).when(mA2dpService).setSilenceMode(mTestDevice, enableSilence); in testSetGetDeviceSilenceConnectedCase()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/ |
D | A2dpStateMachine.java | 91 private A2dpService mA2dpService; field in A2dpStateMachine 104 mA2dpService = a2dpService; in A2dpStateMachine() 116 mA2dpOffloadEnabled = mA2dpService.mA2dpOffloadEnabled; in A2dpStateMachine() 189 if (mA2dpService.okToConnect(mDevice, true)) { in processMessage() 230 if (mA2dpService.okToConnect(mDevice, false)) { in processConnectionEvent() 241 if (mA2dpService.okToConnect(mDevice, false)) { in processConnectionEvent() 432 if (mA2dpService.okToConnect(mDevice, false)) { in processConnectionEvent() 442 if (mA2dpService.okToConnect(mDevice, false)) { in processConnectionEvent() 475 mA2dpService.updateOptionalCodecsSupport(mDevice); in enter() 646 mA2dpService.updateOptionalCodecsSupport(mDevice); in processCodecConfigEvent() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/ |
D | AdapterService.java | 230 private A2dpService mA2dpService; field in AdapterService 893 if (mA2dpService != null && mA2dpService.getConnectionPolicy(device) in isAnyProfileEnabled() 944 if (mA2dpService != null && isSupported(localDeviceUuids, remoteDeviceUuids, in connectEnabledProfiles() 945 BluetoothProfile.A2DP, device) && mA2dpService.getConnectionPolicy(device) in connectEnabledProfiles() 948 mA2dpService.connect(device); in connectEnabledProfiles() 1026 mA2dpService = A2dpService.getA2dpService(); in initProfileServices() 2364 if (setA2dp && mA2dpService != null && (device == null in setActiveDevice() 2365 || mA2dpService.getConnectionPolicy(device) in setActiveDevice() 2368 mA2dpService.setActiveDevice(device); in setActiveDevice() 2410 if (mA2dpService != null && isSupported(localDeviceUuids, remoteDeviceUuids, in connectAllEnabledProfiles() [all …]
|