Home
last modified time | relevance | path

Searched refs:mA2dpService (Results 1 – 7 of 7) sorted by relevance

/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/a2dp/
DA2dpServiceTest.java67 private A2dpService mA2dpService; field in A2dpServiceTest
103 mA2dpService.mA2dpNativeInterface = mA2dpNativeInterface; in setUp()
139 mA2dpService = A2dpService.getA2dpService(); in startService()
140 Assert.assertNotNull(mA2dpService); in startService()
145 mA2dpService = A2dpService.getA2dpService(); in stopService()
146 Assert.assertNull(mA2dpService); in stopService()
230 Assert.assertEquals(mA2dpService, A2dpService.getA2dpService()); in testGetA2dpService()
241 Assert.assertTrue(mA2dpService.setActiveDevice(mTestDevice)); in testStopA2dpService()
246 Assert.assertTrue(mA2dpService.stop()); in testStopA2dpService()
254 Assert.assertTrue(mA2dpService.start()); in testStopA2dpService()
[all …]
DA2dpStateMachineTest.java65 @Mock private A2dpService mA2dpService; field in A2dpStateMachineTest
101 mA2dpStateMachine = new A2dpStateMachine(mTestDevice, mA2dpService, in setUp()
133 doReturn(allow).when(mA2dpService).okToConnect(any(BluetoothDevice.class), in allowConnection()
152 verify(mA2dpService, after(TIMEOUT_MS).never()).sendBroadcast(any(Intent.class), in testIncomingPriorityReject()
175 verify(mA2dpService, timeout(TIMEOUT_MS).times(1)).sendBroadcast(intentArgument1.capture(), in testIncomingPriorityAccept()
195 verify(mA2dpService, timeout(TIMEOUT_MS).times(3)).sendBroadcast(intentArgument2.capture(), in testIncomingPriorityAccept()
222 verify(mA2dpService, timeout(TIMEOUT_MS).times(1)).sendBroadcast(intentArgument1.capture(), in testOutgoingTimeout()
233 verify(mA2dpService, timeout(A2dpStateMachine.sConnectTimeoutMs * 2).times( in testOutgoingTimeout()
262 verify(mA2dpService, timeout(TIMEOUT_MS).times(1)).sendBroadcast(intentArgument1.capture(), in testIncomingTimeout()
273 verify(mA2dpService, timeout(A2dpStateMachine.sConnectTimeoutMs * 2).times( in testIncomingTimeout()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
DPhonePolicyTest.java66 @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 …]
DActiveDeviceManagerTest.java64 @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 …]
DSilenceDeviceManagerTest.java65 @Mock private A2dpService mA2dpService; field in SilenceDeviceManagerTest
76 when(mServiceFactory.getA2dpService()).thenReturn(mA2dpService); in setUp()
110 doReturn(true).when(mA2dpService).setSilenceMode(mTestDevice, enableSilence); in testSetGetDeviceSilenceConnectedCase()
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/
DA2dpStateMachine.java94 private A2dpService mA2dpService; field in A2dpStateMachine
107 mA2dpService = a2dpService; in A2dpStateMachine()
119 mA2dpOffloadEnabled = mA2dpService.mA2dpOffloadEnabled; in A2dpStateMachine()
192 if (mA2dpService.okToConnect(mDevice, true)) { in processMessage()
233 if (mA2dpService.okToConnect(mDevice, false)) { in processConnectionEvent()
244 if (mA2dpService.okToConnect(mDevice, false)) { in processConnectionEvent()
435 if (mA2dpService.okToConnect(mDevice, false)) { in processConnectionEvent()
445 if (mA2dpService.okToConnect(mDevice, false)) { in processConnectionEvent()
478 mA2dpService.updateOptionalCodecsSupport(mDevice); in enter()
649 mA2dpService.updateOptionalCodecsSupport(mDevice); in processCodecConfigEvent()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
DAdapterService.java279 private A2dpService mA2dpService; field in AdapterService
1027 if (mA2dpService != null && mA2dpService.getConnectionPolicy(device) in isAnyProfileEnabled()
1082 if (mA2dpService != null && isSupported(localDeviceUuids, remoteDeviceUuids, in connectEnabledProfiles()
1083 BluetoothProfile.A2DP, device) && mA2dpService.getConnectionPolicy(device) in connectEnabledProfiles()
1086 mA2dpService.connect(device); in connectEnabledProfiles()
1164 mA2dpService = A2dpService.getA2dpService(); in initProfileServices()
2832 if (setA2dp && mA2dpService != null && (device == null in setActiveDevice()
2833 || mA2dpService.getConnectionPolicy(device) in setActiveDevice()
2836 mA2dpService.setActiveDevice(device); in setActiveDevice()
2882 if (mA2dpService != null && isSupported(localDeviceUuids, remoteDeviceUuids, in connectAllEnabledProfiles()
[all …]