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
197 mNativeInterface = spy(HeadsetNativeInterface.getInstance()); in setUp()
198 doNothing().when(mNativeInterface).init(anyInt(), anyBoolean()); in setUp()
199 doNothing().when(mNativeInterface).cleanup(); in setUp()
200 doReturn(true).when(mNativeInterface).connectHfp(any(BluetoothDevice.class)); in setUp()
201 doReturn(true).when(mNativeInterface).disconnectHfp(any(BluetoothDevice.class)); in setUp()
202 doReturn(true).when(mNativeInterface).connectAudio(any(BluetoothDevice.class)); in setUp()
203 doReturn(true).when(mNativeInterface).disconnectAudio(any(BluetoothDevice.class)); in setUp()
204 doReturn(true).when(mNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in setUp()
205 doReturn(true).when(mNativeInterface).sendBsir(any(BluetoothDevice.class), anyBoolean()); in setUp()
[all …]
DHeadsetServiceTest.java76 private HeadsetNativeInterface mNativeInterface; field in HeadsetServiceTest
125 mNativeInterface = spy(HeadsetNativeInterface.getInstance()); in setUp()
126 doNothing().when(mNativeInterface).init(anyInt(), anyBoolean()); in setUp()
127 doNothing().when(mNativeInterface).cleanup(); in setUp()
128 doReturn(true).when(mNativeInterface).connectHfp(any(BluetoothDevice.class)); in setUp()
129 doReturn(true).when(mNativeInterface).disconnectHfp(any(BluetoothDevice.class)); in setUp()
130 doReturn(true).when(mNativeInterface).connectAudio(any(BluetoothDevice.class)); in setUp()
131 doReturn(true).when(mNativeInterface).disconnectAudio(any(BluetoothDevice.class)); in setUp()
132 doReturn(true).when(mNativeInterface).setActiveDevice(any(BluetoothDevice.class)); in setUp()
133 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.java108 private HeadsetNativeInterface mNativeInterface; field in HeadsetService
159 mNativeInterface = HeadsetObjectsFactory.getInstance().getNativeInterface(); in start()
161 mNativeInterface.init(mMaxHeadsetConnections + 1, isInbandRingingEnabled()); in start()
224 mNativeInterface.cleanup(); in stop()
316 mNativeInterface, mSystemInterface); in messageFromNative()
731 mAdapterService, mNativeInterface, mSystemInterface); in connect()
1035 mNativeInterface.setScoAllowed(allowed); in setAudioRouteAllowed()
1153 if (!mNativeInterface.setActiveDevice(device)) { in setActiveDevice()
1164 mNativeInterface.setActiveDevice(previousActiveDevice); in setActiveDevice()
1173 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
99 mService.mHearingAidNativeInterface = mNativeInterface; in setUp()
294 doReturn(true).when(mNativeInterface).connectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectMissingHearingAidUuid()
295 doReturn(true).when(mNativeInterface).disconnectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectMissingHearingAidUuid()
310 doReturn(true).when(mNativeInterface).connectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectPriorityOff()
311 doReturn(true).when(mNativeInterface).disconnectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectPriorityOff()
337 doReturn(true).when(mNativeInterface).connectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectTimeout()
338 doReturn(true).when(mNativeInterface).disconnectHearingAid(any(BluetoothDevice.class)); in testOutgoingConnectTimeout()
374 doReturn(true).when(mNativeInterface).connectHearingAid(any(BluetoothDevice.class)); in testConnectAPair_connectBothDevices()
375 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.java60 private NativeInterface mNativeInterface = null; field in HeadsetClientService
89 mNativeInterface = NativeInterface.getInstance(); in start()
90 mNativeInterface.initialize(); in start()
146 mNativeInterface.cleanup(); in stop()
147 mNativeInterface = null; in stop()
974 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()