/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/ |
D | HeadsetServiceAndStateMachineTest.java | 98 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 …]
|
D | HeadsetServiceTest.java | 76 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 …]
|
D | HeadsetStateMachineTest.java | 84 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/ |
D | HeadsetStateMachine.java | 133 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 …]
|
D | AtPhonebook.java | 80 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 …]
|
D | HeadsetService.java | 108 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/ |
D | AvrcpTargetService.java | 62 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 …]
|
D | AvrcpVolumeManager.java | 52 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/ |
D | HearingAidServiceTest.java | 75 @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/ |
D | HearingAidStateMachine.java | 88 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/ |
D | HeadsetClientStateMachine.java | 180 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 …]
|
D | VendorCommandResponseProcessor.java | 40 private final NativeInterface mNativeInterface; field in VendorCommandResponseProcessor 74 mNativeInterface = nativeInterface; in VendorCommandResponseProcessor() 113 if (!mNativeInterface.sendATCmd(Utils.getBytesFromAddress(device.getAddress()), in sendCommand()
|
D | HeadsetClientService.java | 60 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/ |
D | HeadsetClientStateMachineTest.java | 63 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()
|