/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
D | BluetoothUtilsTest.java | 62 private BluetoothDevice mBluetoothDevice; field in BluetoothUtilsTest 134 when(mBluetoothDevice.getMetadata( in getBtRainbowDrawableWithDescription_normalHeadset_returnAdaptiveIcon() 136 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in getBtRainbowDrawableWithDescription_normalHeadset_returnAdaptiveIcon() 146 when(mBluetoothDevice.getMetadata( in getStringMetaData_hasMetaData_getCorrectMetaData() 150 assertThat(BluetoothUtils.getStringMetaData(mBluetoothDevice, in getStringMetaData_hasMetaData_getCorrectMetaData() 156 when(mBluetoothDevice.getMetadata( in getIntMetaData_hasMetaData_getCorrectMetaData() 160 assertThat(BluetoothUtils.getIntMetaData(mBluetoothDevice, in getIntMetaData_hasMetaData_getCorrectMetaData() 167 when(mBluetoothDevice.getMetadata( in getIntMetaData_invalidMetaData_getErrorCode() 170 assertThat(BluetoothUtils.getIntMetaData(mBluetoothDevice, in getIntMetaData_invalidMetaData_getErrorCode() 177 when(mBluetoothDevice.getMetadata( in getBooleanMetaData_hasMetaData_getCorrectMetaData() [all …]
|
D | HapClientProfileTest.java | 70 private BluetoothDevice mBluetoothDevice; field in HapClientProfileTest 108 when(mService.getConnectionState(mBluetoothDevice)) in getConnectionStatus_returnCorrectConnectionState() 111 assertThat(mProfile.getConnectionStatus(mBluetoothDevice)) in getConnectionStatus_returnCorrectConnectionState() 118 when(mService.getConnectionPolicy(mBluetoothDevice)).thenReturn(CONNECTION_POLICY_ALLOWED); in isEnabled_connectionPolicyAllowed_returnTrue() 120 assertThat(mProfile.isEnabled(mBluetoothDevice)).isTrue(); in isEnabled_connectionPolicyAllowed_returnTrue() 126 when(mService.getConnectionPolicy(mBluetoothDevice)) in isEnabled_connectionPolicyForbidden_returnFalse() 129 assertThat(mProfile.isEnabled(mBluetoothDevice)).isFalse(); in isEnabled_connectionPolicyForbidden_returnFalse() 135 when(mService.getConnectionPolicy(mBluetoothDevice)).thenReturn(CONNECTION_POLICY_ALLOWED); in getConnectionPolicy_returnCorrectConnectionPolicy() 137 assertThat(mProfile.getConnectionPolicy(mBluetoothDevice)) in getConnectionPolicy_returnCorrectConnectionPolicy() 144 when(mService.getConnectionPolicy(mBluetoothDevice)).thenReturn(CONNECTION_POLICY_ALLOWED); in setEnabled_connectionPolicyAllowed_setConnectionPolicyAllowed_returnFalse() [all …]
|
D | VolumeControlProfileTest.java | 63 @Mock private BluetoothDevice mBluetoothDevice; field in VolumeControlProfileTest 98 when(mService.getConnectionState(mBluetoothDevice)) in getConnectionStatus_returnCorrectConnectionState() 101 assertThat(mProfile.getConnectionStatus(mBluetoothDevice)) in getConnectionStatus_returnCorrectConnectionState() 108 when(mService.getConnectionPolicy(mBluetoothDevice)).thenReturn(CONNECTION_POLICY_ALLOWED); in isEnabled_connectionPolicyAllowed_returnTrue() 110 assertThat(mProfile.isEnabled(mBluetoothDevice)).isTrue(); in isEnabled_connectionPolicyAllowed_returnTrue() 116 when(mService.getConnectionPolicy(mBluetoothDevice)) in isEnabled_connectionPolicyForbidden_returnFalse() 119 assertThat(mProfile.isEnabled(mBluetoothDevice)).isFalse(); in isEnabled_connectionPolicyForbidden_returnFalse() 125 when(mService.getConnectionPolicy(mBluetoothDevice)).thenReturn(CONNECTION_POLICY_ALLOWED); in getConnectionPolicy_returnCorrectConnectionPolicy() 127 assertThat(mProfile.getConnectionPolicy(mBluetoothDevice)) in getConnectionPolicy_returnCorrectConnectionPolicy() 134 when(mService.getConnectionPolicy(mBluetoothDevice)).thenReturn(CONNECTION_POLICY_ALLOWED); in setEnabled_connectionPolicyAllowed_setConnectionPolicyAllowed_returnFalse() [all …]
|
D | HeadsetProfileTest.java | 39 private BluetoothDevice mBluetoothDevice; field in HeadsetProfileTest 50 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp() 59 when(mService.getAudioState(mBluetoothDevice)). in testHeadsetProfile_shouldReturnAudioState() 61 assertThat(mProfile.getAudioState(mBluetoothDevice)). in testHeadsetProfile_shouldReturnAudioState() 64 when(mService.getAudioState(mBluetoothDevice)). in testHeadsetProfile_shouldReturnAudioState() 66 assertThat(mProfile.getAudioState(mBluetoothDevice)). in testHeadsetProfile_shouldReturnAudioState() 73 assertThat(mProfile.setActiveDevice(mBluetoothDevice)).isTrue(); in setActiveDevice_returnTrue()
|
D | PbapClientProfileTest.java | 51 private BluetoothDevice mBluetoothDevice; field in PbapClientProfileTest 68 when(mService.getConnectionState(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState() 70 assertThat(mProfile.getConnectionStatus(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState()
|
D | A2dpSinkProfileTest.java | 51 private BluetoothDevice mBluetoothDevice; field in A2dpSinkProfileTest 68 when(mService.getConnectionState(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState() 70 assertThat(mProfile.getConnectionStatus(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState()
|
D | HfpClientProfileTest.java | 51 private BluetoothDevice mBluetoothDevice; field in HfpClientProfileTest 68 when(mService.getConnectionState(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState() 70 assertThat(mProfile.getConnectionStatus(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState()
|
D | HidDeviceProfileTest.java | 51 private BluetoothDevice mBluetoothDevice; field in HidDeviceProfileTest 68 when(mService.getConnectionState(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState() 70 assertThat(mProfile.getConnectionStatus(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState()
|
D | MapClientProfileTest.java | 51 private BluetoothDevice mBluetoothDevice; field in MapClientProfileTest 68 when(mService.getConnectionState(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState() 70 assertThat(mProfile.getConnectionStatus(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState()
|
D | SapProfileTest.java | 51 private BluetoothDevice mBluetoothDevice; field in SapProfileTest 67 when(mService.getConnectionState(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState() 69 assertThat(mProfile.getConnectionStatus(mBluetoothDevice)). in getConnectionStatus_shouldReturnConnectionState()
|
D | BluetoothEventManagerTest.java | 80 private BluetoothDevice mBluetoothDevice; field in BluetoothEventManagerTest 121 when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(mCachedBluetoothDevice); in setUp() 363 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); in dispatchAclConnectionStateChanged_aclDisconnected_shouldDispatchCallback() 375 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); in dispatchAclConnectionStateChanged_aclConnected_shouldDispatchCallback() 385 when(mCachedDeviceManager.isSubDevice(mBluetoothDevice)).thenReturn(true); in dispatchAclConnectionStateChanged_aclDisconnected_shouldNotCallbackSubDevice() 388 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); in dispatchAclConnectionStateChanged_aclDisconnected_shouldNotCallbackSubDevice() 398 when(mCachedDeviceManager.isSubDevice(mBluetoothDevice)).thenReturn(true); in dispatchAclConnectionStateChanged_aclConnected_shouldNotCallbackSubDevice() 401 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); in dispatchAclConnectionStateChanged_aclConnected_shouldNotCallbackSubDevice() 411 when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(null); in dispatchAclConnectionStateChanged_findDeviceReturnNull_shouldNotDispatchCallback() 414 mIntent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); in dispatchAclConnectionStateChanged_findDeviceReturnNull_shouldNotDispatchCallback() [all …]
|
D | HearingAidProfileTest.java | 54 private BluetoothDevice mBluetoothDevice; field in HearingAidProfileTest 66 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp() 75 assertThat(mProfile.setActiveDevice(mBluetoothDevice)).isTrue(); in setActiveDevice_returnTrue()
|
/frameworks/base/services/core/java/com/android/server/input/ |
D | BatteryController.java | 388 (m.mBluetoothDevice != null in handleBluetoothBatteryLevelChange() 389 && address.equals(m.mBluetoothDevice.getAddress()))); in handleBluetoothBatteryLevelChange() 400 findIf(mDeviceMonitors, (m) -> device.equals(m.mBluetoothDevice)); in handleBluetoothMetadataChange() 535 if (anyOf(mDeviceMonitors, (m) -> m.mBluetoothDevice != null)) { in updateBluetoothBatteryMonitoring() 558 private BluetoothDevice mBluetoothDevice; field in BatteryController.DeviceMonitor 606 if (!Objects.equals(mBluetoothDevice, bluetoothDevice)) { in configureDeviceMonitor() 616 mBluetoothDevice = bluetoothDevice; in configureDeviceMonitor() 619 if (mBluetoothDevice != null) { in configureDeviceMonitor() 621 mBluetoothDevice.getAddress()); in configureDeviceMonitor() 656 Objects.requireNonNull(mBluetoothDevice); in startBluetoothMetadataMonitoring() [all …]
|
/frameworks/base/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/ |
D | BluetoothMidiDevice.java | 74 private final BluetoothDevice mBluetoothDevice; field in BluetoothMidiDevice 186 Log.e(TAG, "No CLIENT_CHARACTERISTIC_CONFIG for device " + mBluetoothDevice); 271 mBluetoothDevice = device; in BluetoothMidiDevice() 278 mBluetoothGatt = mBluetoothDevice.connectGatt(context, false, mGattCallback); in BluetoothMidiDevice() 299 new Thread("BluetoothMidiDevice " + mBluetoothDevice) { in BluetoothMidiDevice() 327 synchronized (mBluetoothDevice) { in close() 329 mService.deviceClosed(mBluetoothDevice); in close()
|
/frameworks/base/services/midi/java/com/android/server/midi/ |
D | MidiService.java | 389 private final BluetoothDevice mBluetoothDevice; field in MidiService.Device 424 mBluetoothDevice = (BluetoothDevice)deviceInfo.getProperties().getParcelable( in Device() 430 mBluetoothDevice = bluetoothDevice; in Device() 543 (mServiceInfo != null || mBluetoothDevice != null)) { in addDeviceConnection() 551 + mBluetoothDevice); in addDeviceConnection() 553 if (mBluetoothDevice != null) { in addDeviceConnection() 563 mBluetoothDevice); in addDeviceConnection() 583 if (mBluetoothDevice != null) { in addDeviceConnection() 640 if (mBluetoothDevice != null) { in removeDeviceConnection() 685 if (mBluetoothDevice != null) { in closeLocked() [all …]
|