/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bluetooth/qsdialog/ |
D | DeviceItemFactoryTest.kt | 48 @Mock private lateinit var bluetoothDevice: BluetoothDevice variable in com.android.systemui.bluetooth.qsdialog.DeviceItemFactoryTest 61 `when`(cachedDevice.device).thenReturn(bluetoothDevice) in setup() 122 `when`(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_EXCLUSIVE_MANAGER)) in testSavedFactory_isFilterMatched_exclusivelyManaged_returnsFalse() 146 `when`(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_EXCLUSIVE_MANAGER)) in testSavedFactory_isFilterMatched_exclusiveManagerNotEnabled_returnsTrue() 160 `when`(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_EXCLUSIVE_MANAGER)) in testSavedFactory_isFilterMatched_exclusiveManagerNotInstalled_returnsTrue() 194 `when`(bluetoothDevice.bondState).thenReturn(BluetoothDevice.BOND_BONDED) in testConnectedFactory_isFilterMatched_bondedAndConnected_returnsTrue() 195 `when`(bluetoothDevice.isConnected).thenReturn(true) in testConnectedFactory_isFilterMatched_bondedAndConnected_returnsTrue() 205 `when`(bluetoothDevice.bondState).thenReturn(BluetoothDevice.BOND_BONDED) in testConnectedFactory_isFilterMatched_notConnected_returnsFalse() 206 `when`(bluetoothDevice.isConnected).thenReturn(false) in testConnectedFactory_isFilterMatched_notConnected_returnsFalse() 216 `when`(bluetoothDevice.bondState).thenReturn(BluetoothDevice.BOND_NONE) in testConnectedFactory_isFilterMatched_notBonded_returnsFalse() [all …]
|
D | DeviceItemActionInteractorTest.kt | 68 @Mock private lateinit var bluetoothDevice: BluetoothDevice variable in com.android.systemui.bluetooth.qsdialog.DeviceItemActionInteractorTest 245 whenever(cachedBluetoothDevice.device).thenReturn(bluetoothDevice) in testOnClick_inAudioSharing_clickedDeviceNoSource_shouldLaunchSettings() 313 .thenReturn(listOf(bluetoothDevice)) in testOnClick_hasOneConnectedLeDevice_clickedNonLe_shouldNotLaunchSettings() 330 whenever(cachedBluetoothDevice.device).thenReturn(bluetoothDevice) in testOnClick_hasOneConnectedLeDevice_clickedLe_shouldLaunchSettings() 344 .thenReturn(listOf(bluetoothDevice)) in testOnClick_hasOneConnectedLeDevice_clickedLe_shouldLaunchSettings() 372 .thenReturn(listOf(bluetoothDevice)) in testOnClick_hasOneConnectedLeDevice_clickedConnectedLe_shouldNotLaunchSettings() 400 .thenReturn(listOf(bluetoothDevice, bluetoothDeviceGroupId2)) in testOnClick_hasTwoConnectedLeDevice_clickedNotConnectedLe_shouldNotLaunchSettings() 403 if (device == bluetoothDevice) GROUP_ID_1 else GROUP_ID_2 in testOnClick_hasTwoConnectedLeDevice_clickedNotConnectedLe_shouldNotLaunchSettings() 421 whenever(cachedBluetoothDevice.device).thenReturn(bluetoothDevice) in testOnClick_hasTwoConnectedLeDevice_clickedConnectedLe_shouldLaunchSettings() 435 .thenReturn(listOf(bluetoothDevice, bluetoothDeviceGroupId2)) in testOnClick_hasTwoConnectedLeDevice_clickedConnectedLe_shouldLaunchSettings() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
D | A2dpProfile.java | 227 BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); in supportsHighQualityAudio() local 228 if (bluetoothDevice == null) { in supportsHighQualityAudio() 231 int support = mService.isOptionalCodecsSupported(bluetoothDevice); in supportsHighQualityAudio() 240 BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); in isHighQualityAudioEnabled() local 241 if (bluetoothDevice == null) { in isHighQualityAudioEnabled() 244 int enabled = mService.isOptionalCodecsEnabled(bluetoothDevice); in isHighQualityAudioEnabled() 247 } else if (getConnectionStatus(bluetoothDevice) != BluetoothProfile.STATE_CONNECTED in isHighQualityAudioEnabled() 248 && supportsHighQualityAudio(bluetoothDevice)) { in isHighQualityAudioEnabled() 255 if (mService.getCodecStatus(bluetoothDevice) != null) { in isHighQualityAudioEnabled() 256 codecConfig = mService.getCodecStatus(bluetoothDevice).getCodecConfig(); in isHighQualityAudioEnabled() [all …]
|
D | BluetoothUtils.java | 228 final BluetoothDevice bluetoothDevice = cachedDevice.getDevice(); in getBtDrawableWithDescription() local 234 if (isAdvancedDetailsHeader(bluetoothDevice)) { in getBtDrawableWithDescription() 235 final Uri iconUri = getUriMetaData(bluetoothDevice, BluetoothDevice.METADATA_MAIN_ICON); in getBtDrawableWithDescription() 272 public static boolean isAdvancedDetailsHeader(@NonNull BluetoothDevice bluetoothDevice) { in isAdvancedDetailsHeader() argument 276 if (isUntetheredHeadset(bluetoothDevice)) { in isAdvancedDetailsHeader() 281 if (getUriMetaData(bluetoothDevice, BluetoothDevice.METADATA_MAIN_ICON) != null) { in isAdvancedDetailsHeader() 289 getStringMetaData(bluetoothDevice, BluetoothDevice.METADATA_DEVICE_TYPE); in isAdvancedDetailsHeader() 306 public static boolean isAdvancedUntetheredDevice(@NonNull BluetoothDevice bluetoothDevice) { in isAdvancedUntetheredDevice() argument 310 if (isUntetheredHeadset(bluetoothDevice)) { in isAdvancedUntetheredDevice() 317 getStringMetaData(bluetoothDevice, BluetoothDevice.METADATA_DEVICE_TYPE); in isAdvancedUntetheredDevice() [all …]
|
D | LocalBluetoothLeBroadcast.java | 1138 bluetoothDevice -> { in updateFallbackActiveDeviceIfNeeded() 1141 bluetoothDevice); in updateFallbackActiveDeviceIfNeeded()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
D | BluetoothMediaDeviceTest.java | 80 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in isFastPairDevice_isUntetheredHeadset_returnTrue() local 81 when(mDevice.getDevice()).thenReturn(bluetoothDevice); in isFastPairDevice_isUntetheredHeadset_returnTrue() 85 when(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)) in isFastPairDevice_isUntetheredHeadset_returnTrue() 93 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in isFastPairDevice_isNotUntetheredHeadset_returnFalse() local 94 when(mDevice.getDevice()).thenReturn(bluetoothDevice); in isFastPairDevice_isNotUntetheredHeadset_returnFalse() 98 when(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)) in isFastPairDevice_isNotUntetheredHeadset_returnFalse() 106 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in getIcon_isNotFastPairDevice_drawableTypeIsNotBitmapDrawable() local 107 when(mDevice.getDevice()).thenReturn(bluetoothDevice); in getIcon_isNotFastPairDevice_drawableTypeIsNotBitmapDrawable() 111 when(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)) in getIcon_isNotFastPairDevice_drawableTypeIsNotBitmapDrawable()
|
D | LocalMediaManagerTest.java | 459 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in onDeviceListAdded_haveMutingExpectedDevice_addMutingExpectedDevice() local 462 bluetoothDevices.add(bluetoothDevice); in onDeviceListAdded_haveMutingExpectedDevice_addMutingExpectedDevice() 470 when(cachedManager.findDevice(bluetoothDevice)).thenReturn(cachedDevice); in onDeviceListAdded_haveMutingExpectedDevice_addMutingExpectedDevice() 474 when(cachedDevice.getDevice()).thenReturn(bluetoothDevice); in onDeviceListAdded_haveMutingExpectedDevice_addMutingExpectedDevice() 476 when(mA2dpProfile.getActiveDevice()).thenReturn(bluetoothDevice); in onDeviceListAdded_haveMutingExpectedDevice_addMutingExpectedDevice()
|
/frameworks/base/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/ |
D | BluetoothMidiService.java | 45 public IBinder addBluetoothDevice(BluetoothDevice bluetoothDevice) { 47 if (bluetoothDevice == null) { 52 device = mDeviceServerMap.get(bluetoothDevice); 55 bluetoothDevice, BluetoothMidiService.this); 56 mDeviceServerMap.put(bluetoothDevice, device);
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/panel/component/spatial/domain/interactor/ |
D | SpatialAudioComponentInteractorTest.kt | 69 private val bluetoothDevice: BluetoothDevice = mock {} in <lambda>() constant in com.android.systemui.volume.panel.component.spatial.domain.interactor.SpatialAudioComponentInteractorTest 72 whenever(isEnabled(bluetoothDevice)).thenReturn(false) in <lambda>() 76 whenever(isEnabled(bluetoothDevice)).thenReturn(true) in <lambda>() 80 whenever(isEnabled(bluetoothDevice)).thenReturn(false) in <lambda>() 88 whenever(device).thenReturn(bluetoothDevice) in setup() 140 whenever(a2dpProfile.isEnabled(bluetoothDevice)).thenReturn(true) in setEnabled_determinedByBluetoothProfile_a2dpProfileEnabled() 141 whenever(leAudioProfile.isEnabled(bluetoothDevice)).thenReturn(false) in setEnabled_determinedByBluetoothProfile_a2dpProfileEnabled() 142 whenever(hearingAidProfile.isEnabled(bluetoothDevice)).thenReturn(false) in setEnabled_determinedByBluetoothProfile_a2dpProfileEnabled()
|
/frameworks/base/core/java/android/accessibilityservice/ |
D | BrailleDisplayControllerImpl.java | 85 public void connect(@NonNull BluetoothDevice bluetoothDevice, in connect() argument 87 connect(bluetoothDevice, mAccessibilityService.getMainExecutor(), callback); in connect() 92 public void connect(@NonNull BluetoothDevice bluetoothDevice, in connect() argument 95 Objects.requireNonNull(bluetoothDevice); in connect() 99 bluetoothDevice.getAddress(), new IBrailleDisplayControllerWrapper()), in connect()
|
D | BrailleDisplayController.java | 152 void connect(@NonNull BluetoothDevice bluetoothDevice, in connect() argument 174 void connect(@NonNull BluetoothDevice bluetoothDevice, in connect() argument
|
/frameworks/base/services/core/java/com/android/server/media/ |
D | BluetoothDeviceRoutesManager.java | 146 BluetoothDevice bluetoothDevice = mAddressToBondedDevice.get(address); in getRouteIdForBluetoothAddress() local 147 return bluetoothDevice != null in getRouteIdForBluetoothAddress() 148 ? getRouteIdForType(bluetoothDevice, getDeviceType(bluetoothDevice)) in getRouteIdForBluetoothAddress() 154 BluetoothDevice bluetoothDevice = mAddressToBondedDevice.get(address); in getNameForBluetoothAddress() local 155 return bluetoothDevice != null ? getDeviceName(bluetoothDevice) : null; in getNameForBluetoothAddress()
|
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/volume/panel/component/mediaoutput/domain/interactor/ |
D | TestMediaDevicesFactory.kt | 59 val bluetoothDevice = in bluetoothMediaDevice() constant 67 whenever(isEnabled(bluetoothDevice)).thenReturn(true) in bluetoothMediaDevice() 72 whenever(device).thenReturn(bluetoothDevice) in bluetoothMediaDevice()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/stylus/ |
D | StylusManagerTest.kt | 62 @Mock lateinit var bluetoothDevice: BluetoothDevice in <lambda>() variable in com.android.systemui.stylus.StylusManagerTest 118 whenever(bluetoothAdapter.getRemoteDevice(STYLUS_BT_ADDRESS)).thenReturn(bluetoothDevice) in <lambda>() 119 whenever(bluetoothDevice.address).thenReturn(STYLUS_BT_ADDRESS) in <lambda>() 171 .addOnMetadataChangedListener(bluetoothDevice, EXECUTOR, stylusManager) in <lambda>() 462 bluetoothDevice, in <lambda>() 468 .onStylusBluetoothChargingStateChanged(BT_STYLUS_DEVICE_ID, bluetoothDevice, true) in <lambda>() 476 bluetoothDevice, in <lambda>() 482 .onStylusBluetoothChargingStateChanged(BT_STYLUS_DEVICE_ID, bluetoothDevice, false) in <lambda>() 488 bluetoothDevice, in <lambda>() 501 bluetoothDevice, in <lambda>()
|
/frameworks/base/media/java/android/media/midi/ |
D | IBluetoothMidiService.aidl | 25 IBinder addBluetoothDevice(in BluetoothDevice bluetoothDevice); in addBluetoothDevice() argument
|
D | MidiManager.java | 404 public void openBluetoothDevice(BluetoothDevice bluetoothDevice, in openBluetoothDevice() argument 409 Log.d(TAG, "openBluetoothDevice() " + bluetoothDevice); in openBluetoothDevice() 429 mService.openBluetoothDevice(mToken, bluetoothDevice, callback); in openBluetoothDevice()
|
D | IMidiManager.aidl | 41 void openBluetoothDevice(IBinder clientToken, in BluetoothDevice bluetoothDevice, in openBluetoothDevice() argument
|
/frameworks/base/services/midi/java/com/android/server/midi/ |
D | MidiService.java | 429 public Device(BluetoothDevice bluetoothDevice) { in Device() argument 430 mBluetoothDevice = bluetoothDevice; in Device() 1147 private void openBluetoothDevice(BluetoothDevice bluetoothDevice) { in openBluetoothDevice() argument 1148 Log.d(TAG, "openBluetoothDevice() device: " + bluetoothDevice); in openBluetoothDevice() 1151 midiManager.openBluetoothDevice(bluetoothDevice, in openBluetoothDevice() 1157 mBleMidiDeviceMap.put(bluetoothDevice, device); in openBluetoothDevice() 1163 private void closeBluetoothDevice(BluetoothDevice bluetoothDevice) { in closeBluetoothDevice() argument 1164 Log.d(TAG, "closeBluetoothDevice() device: " + bluetoothDevice); in closeBluetoothDevice() 1168 midiDevice = mBleMidiDeviceMap.remove(bluetoothDevice); in closeBluetoothDevice() 1181 public void openBluetoothDevice(IBinder token, BluetoothDevice bluetoothDevice, in openBluetoothDevice() argument [all …]
|
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/volume/data/repository/ |
D | TestAudioDevicesFactory.kt | 49 fun bluetoothDevice( in bluetoothDevice() method
|
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/volume/domain/interactor/ |
D | AudioOutputInteractorTest.kt | 129 val btDevice = TestAudioDevicesFactory.bluetoothDevice() in inCall_bluetooth_returnsCommunicationDevice() 134 val bluetoothDevice: BluetoothDevice = mock { in inCall_bluetooth_returnsCommunicationDevice() constant 143 .thenReturn(bluetoothDevice) in inCall_bluetooth_returnsCommunicationDevice()
|
/frameworks/base/services/core/java/com/android/server/input/ |
D | BatteryController.java | 605 final BluetoothDevice bluetoothDevice = getBluetoothDevice(deviceId); in configureDeviceMonitor() local 606 if (!Objects.equals(mBluetoothDevice, bluetoothDevice)) { in configureDeviceMonitor() 609 + ((bluetoothDevice != null) ? "" : "not") in configureDeviceMonitor() 616 mBluetoothDevice = bluetoothDevice; in configureDeviceMonitor() 956 final BluetoothDevice bluetoothDevice = intent.getParcelableExtra( 958 if (bluetoothDevice == null) { 967 eventTime, bluetoothDevice.getAddress(), batteryLevel);
|
/frameworks/base/tests/Input/src/com/android/server/input/ |
D | BatteryControllerTests.kt | 833 val bluetoothDevice = createBluetoothDevice("AA:BB:CC:DD:EE:FF") in testNotifiesBluetoothMetadataBatteryChanges() constant 841 bluetoothDevice, BluetoothDevice.METADATA_MAIN_BATTERY, "21".toByteArray()) in testNotifiesBluetoothMetadataBatteryChanges() 845 bluetoothDevice, BluetoothDevice.METADATA_MAIN_BATTERY, "25".toByteArray()) in testNotifiesBluetoothMetadataBatteryChanges() 849 bluetoothDevice, BluetoothDevice.METADATA_MAIN_CHARGING, "true".toByteArray()) in testNotifiesBluetoothMetadataBatteryChanges() 853 bluetoothDevice, BluetoothDevice.METADATA_MAIN_CHARGING, "false".toByteArray()) in testNotifiesBluetoothMetadataBatteryChanges() 857 bluetoothDevice, BluetoothDevice.METADATA_MAIN_CHARGING, null) in testNotifiesBluetoothMetadataBatteryChanges() 875 val bluetoothDevice = createBluetoothDevice("AA:BB:CC:DD:EE:FF") in testBluetoothMetadataBatteryIsPrioritized() constant 889 bluetoothDevice, BluetoothDevice.METADATA_MAIN_BATTERY, "24".toByteArray()) in testBluetoothMetadataBatteryIsPrioritized() 895 bluetoothDevice, BluetoothDevice.METADATA_MAIN_BATTERY, null) in testBluetoothMetadataBatteryIsPrioritized()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/ |
D | VolumePanelDialog.java | 267 final BluetoothDevice bluetoothDevice = findActiveDevice(); in getExtraControlUri() local 268 if (bluetoothDevice != null) { in getExtraControlUri() 275 final String uri = BluetoothUtils.getControlUriMetaData(bluetoothDevice); in getExtraControlUri()
|
/frameworks/base/telecomm/java/android/telecom/ |
D | InCallService.java | 657 public final void requestBluetoothAudio(@NonNull BluetoothDevice bluetoothDevice) { in requestBluetoothAudio() argument 659 mPhone.requestBluetoothAudio(bluetoothDevice.getAddress()); in requestBluetoothAudio()
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
D | BluetoothControllerImplTest.java | 374 BluetoothAdapter.OnMetadataChangedListener listener = (bluetoothDevice, i, bytes) -> { in testAddOnMetadataChangedListener_registersListenerOnAdapter() 387 BluetoothAdapter.OnMetadataChangedListener listener = (bluetoothDevice, i, bytes) -> { in testRemoveOnMetadataChangedListener_removesListenerFromAdapter()
|