Home
last modified time | relevance | path

Searched refs:mNativeInterface (Results 1 – 14 of 14) sorted by relevance

/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/
DHeadsetServiceAndStateMachineTest.java98 private HeadsetNativeInterface mNativeInterface; field in HeadsetServiceAndStateMachineTest
196 mNativeInterface = spy(HeadsetNativeInterface.getInstance()); in setUp()
197 doNothing().when(mNativeInterface).init(anyInt(), anyBoolean()); in setUp()
198 doNothing().when(mNativeInterface).cleanup(); in setUp()
199 doReturn(true).when(mNativeInterface).connectHfp(any(BluetoothDevice.class)); in setUp()
200 doReturn(true).when(mNativeInterface).disconnectHfp(any(BluetoothDevice.class)); in setUp()
201 doReturn(true).when(mNativeInterface).connectAudio(any(BluetoothDevice.class)); in setUp()
202 doReturn(true).when(mNativeInterface).disconnectAudio(any(BluetoothDevice.class)); in setUp()
203 doReturn(true).when(mNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in setUp()
204 doReturn(true).when(mNativeInterface).sendBsir(any(BluetoothDevice.class), anyBoolean()); in setUp()
[all …]
DHeadsetServiceTest.java76 private HeadsetNativeInterface mNativeInterface; field in HeadsetServiceTest
124 mNativeInterface = spy(HeadsetNativeInterface.getInstance()); in setUp()
125 doNothing().when(mNativeInterface).init(anyInt(), anyBoolean()); in setUp()
126 doNothing().when(mNativeInterface).cleanup(); in setUp()
127 doReturn(true).when(mNativeInterface).connectHfp(any(BluetoothDevice.class)); in setUp()
128 doReturn(true).when(mNativeInterface).disconnectHfp(any(BluetoothDevice.class)); in setUp()
129 doReturn(true).when(mNativeInterface).connectAudio(any(BluetoothDevice.class)); in setUp()
130 doReturn(true).when(mNativeInterface).disconnectAudio(any(BluetoothDevice.class)); in setUp()
131 doReturn(true).when(mNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in setUp()
132 doReturn(true).when(mNativeInterface).sendBsir(any(BluetoothDevice.class), anyBoolean()); in setUp()
[all …]
DHeadsetStateMachineTest.java84 private HeadsetNativeInterface mNativeInterface; field in HeadsetStateMachineTest
102 mNativeInterface = spy(HeadsetNativeInterface.getInstance()); in setUp()
103 doNothing().when(mNativeInterface).init(anyInt(), anyBoolean()); in setUp()
104 doReturn(true).when(mNativeInterface).connectHfp(mTestDevice); in setUp()
105 doReturn(true).when(mNativeInterface).disconnectHfp(mTestDevice); in setUp()
106 doReturn(true).when(mNativeInterface).connectAudio(mTestDevice); in setUp()
107 doReturn(true).when(mNativeInterface).disconnectAudio(mTestDevice); in setUp()
131 mAdapterService, mNativeInterface, mSystemInterface); in setUp()
945 verify(mNativeInterface, timeout(ASYNC_CALL_TIMEOUT_MILLIS)).disconnectAudio(mTestDevice); in testKeyPressedEventWhenIdleAndAudioOn_disconnectAudio()
/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
DHeadsetStateMachine.java133 private final HeadsetNativeInterface mNativeInterface; field in HeadsetStateMachine
177 mNativeInterface = in HeadsetStateMachine()
184 mPhonebook = new AtPhonebook(mHeadsetService, mNativeInterface); in HeadsetStateMachine()
470 if (!mNativeInterface.connectHfp(device)) { in processMessage()
530 if (!mNativeInterface.disconnectHfp(mDevice)) { in processConnectionEvent()
830 if (!mNativeInterface.startVoiceRecognition(mDevice)) { in processMessage()
843 if (!mNativeInterface.stopVoiceRecognition(mDevice)) { in processMessage()
851 if (!mNativeInterface.phoneStateChange(mDevice, callState)) { in processMessage()
858 mNativeInterface.notifyDeviceStatus(mDevice, (HeadsetDeviceState) message.obj); in processMessage()
869 mNativeInterface.clccResponse(device, 0, 0, 0, 0, false, "", 0); in processMessage()
[all …]
DAtPhonebook.java80 private HeadsetNativeInterface mNativeInterface; field in AtPhonebook
103 mNativeInterface = nativeInterface; in AtPhonebook()
180 mNativeInterface.atResponseCode(device, atCommandResult, atCommandErrorCode); in handleCscsCommand()
199 mNativeInterface.atResponseString(device, atCommandResponse); in handleCscsCommand()
201 mNativeInterface.atResponseCode(device, atCommandResult, atCommandErrorCode); in handleCscsCommand()
268 mNativeInterface.atResponseString(device, atCommandResponse); in handleCpbsCommand()
270 mNativeInterface.atResponseCode(device, atCommandResult, atCommandErrorCode); in handleCpbsCommand()
293 mNativeInterface.atResponseCode(remoteDevice, atCommandResult, in handleCpbrCommand()
308 mNativeInterface.atResponseString(remoteDevice, atCommandResponse); in handleCpbrCommand()
309 mNativeInterface.atResponseCode(remoteDevice, atCommandResult, atCommandErrorCode); in handleCpbrCommand()
[all …]
DHeadsetService.java106 private HeadsetNativeInterface mNativeInterface; field in HeadsetService
155 mNativeInterface = HeadsetObjectsFactory.getInstance().getNativeInterface(); in start()
157 mNativeInterface.init(mMaxHeadsetConnections + 1, isInbandRingingEnabled()); in start()
220 mNativeInterface.cleanup(); in stop()
312 mNativeInterface, mSystemInterface); in messageFromNative()
727 mAdapterService, mNativeInterface, mSystemInterface); in connect()
1028 mNativeInterface.setScoAllowed(allowed); in setAudioRouteAllowed()
1146 if (!mNativeInterface.setActiveDevice(device)) { in setActiveDevice()
1157 mNativeInterface.setActiveDevice(previousActiveDevice); in setActiveDevice()
1166 mNativeInterface.setActiveDevice(previousActiveDevice); in setActiveDevice()
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcp/
DAvrcpTargetService.java62 private AvrcpNativeInterface mNativeInterface; field in AvrcpTargetService
75 if (mNativeInterface == null) return; in run()
87 mNativeInterface.sendMediaUpdate(metadata, state, queue); in run()
93 if (mNativeInterface == null) return; in run()
95 mNativeInterface.sendFolderUpdate(availablePlayers, addressedPlayers, uids); in run()
104 if (mNativeInterface == null) return; in onReceive()
107 mNativeInterface.sendMediaUpdate(false, true, false); in onReceive()
109 if (mNativeInterface == null) return; in onReceive()
117 if (mNativeInterface.disconnectDevice(device.getAddress())) { in onReceive()
189 mNativeInterface = AvrcpNativeInterface.getInterface(); in start()
[all …]
DAvrcpVolumeManager.java52 AvrcpNativeInterface mNativeInterface; field in AvrcpVolumeManager
89 mNativeInterface.sendVolumeChanged(device.getAddress(), avrcpVolume); in switchVolumeDevice()
97 mNativeInterface = nativeInterface; in AvrcpVolumeManager()
193 mNativeInterface.sendVolumeChanged(device.getAddress(), avrcpVolume); in sendVolumeChanged()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hearingaid/
DHearingAidServiceTest.java75 @Mock private HearingAidNativeInterface mNativeInterface; field in HearingAidServiceTest
98 mService.mHearingAidNativeInterface = mNativeInterface; in setUp()
297 doReturn(true).when(mNativeInterface).connectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectMissingHearingAidUuid()
298 doReturn(true).when(mNativeInterface).disconnectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectMissingHearingAidUuid()
313 doReturn(true).when(mNativeInterface).connectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectPriorityOff()
314 doReturn(true).when(mNativeInterface).disconnectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectPriorityOff()
342 doReturn(true).when(mNativeInterface).connectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectTimeout()
343 doReturn(true).when(mNativeInterface).disconnectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectTimeout()
380 doReturn(true).when(mNativeInterface).connectHearingAid(any(BluetoothDevice.class)); in testConnectAPair_connectBothDevices()
381 doReturn(true).when(mNativeInterface).disconnectHearingAid(any(BluetoothDevice.class)); in testConnectAPair_connectBothDevices()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/
DHearingAidStateMachine.java88 private HearingAidNativeInterface mNativeInterface; field in HearingAidStateMachine
97 mNativeInterface = nativeInterface; in HearingAidStateMachine()
162 if (!mNativeInterface.connectHearingAid(mDevice)) { in processMessage()
175 mNativeInterface.disconnectHearingAid(mDevice); in processMessage()
213 mNativeInterface.disconnectHearingAid(mDevice); in processConnectionEvent()
224 mNativeInterface.disconnectHearingAid(mDevice); in processConnectionEvent()
267 mNativeInterface.disconnectHearingAid(mDevice); in processMessage()
270 mNativeInterface.addToWhiteList(mDevice); in processMessage()
281 mNativeInterface.disconnectHearingAid(mDevice); in processMessage()
358 mNativeInterface.disconnectHearingAid(mDevice); in processMessage()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hfpclient/
DHeadsetClientStateMachine.java180 private final NativeInterface mNativeInterface; field in HeadsetClientStateMachine
271 mNativeInterface.queryCurrentCalls(getByteAddress(mCurrentDevice)); in queryCallsStart()
494 if (mNativeInterface.handleCallAction(getByteAddress(mCurrentDevice), action, 0)) { in acceptCall()
533 if (mNativeInterface.handleCallAction(getByteAddress(mCurrentDevice), action, 0)) { in rejectCall()
558 if (mNativeInterface.handleCallAction(getByteAddress(mCurrentDevice), action, 0)) { in holdCall()
579 if (mNativeInterface.handleCallAction(getByteAddress(mCurrentDevice), action, 0)) { in terminateCall()
597 if (mNativeInterface.handleCallAction(getByteAddress(mCurrentDevice), in enterPrivateMode()
613 if (mNativeInterface.handleCallAction(getByteAddress(mCurrentDevice), in explicitCallTransfer()
670 mNativeInterface = nativeInterface; in HeadsetClientStateMachine()
673 mVendorProcessor = new VendorCommandResponseProcessor(mService, mNativeInterface); in HeadsetClientStateMachine()
[all …]
DVendorCommandResponseProcessor.java40 private final NativeInterface mNativeInterface; field in VendorCommandResponseProcessor
74 mNativeInterface = nativeInterface; in VendorCommandResponseProcessor()
113 if (!mNativeInterface.sendATCmd(Utils.getBytesFromAddress(device.getAddress()), in sendCommand()
DHeadsetClientService.java58 private NativeInterface mNativeInterface = null; field in HeadsetClientService
83 mNativeInterface = NativeInterface.getInstance(); in start()
84 mNativeInterface.initialize(); in start()
140 mNativeInterface.cleanup(); in stop()
141 mNativeInterface = null; in stop()
965 sm = mSmFactory.make(this, mSmThread, mNativeInterface); in getStateMachine()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfpclient/
DHeadsetClientStateMachineTest.java63 private NativeInterface mNativeInterface; field in HeadsetClientStateMachineTest
85 mNativeInterface = spy(NativeInterface.getInstance()); in setUp()
98 mNativeInterface); in setUp()
397 verify(mNativeInterface, timeout(STANDARD_WAIT_MILLIS).times(1)).sendATCmd( in runSupportedVendorAtCommand()
440 verify(mNativeInterface, timeout(STANDARD_WAIT_MILLIS).times(0)) in runUnsupportedVendorAtCommand()
581 when(mNativeInterface.startVoiceRecognition(any(byte[].class))).thenReturn(true); in testVoiceRecognitionStateChange()
582 when(mNativeInterface.stopVoiceRecognition(any(byte[].class))).thenReturn(true); in testVoiceRecognitionStateChange()