/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
H A D | CachedBluetoothDeviceManager.java | 71 cachedDevice.setJustDiscovered(false); in onDeviceDisappeared() 77 if (cachedDevice != null) { in onDeviceNameUpdated() 78 cachedDevice.refreshName(); in onDeviceNameUpdated() 95 return cachedDevice; in findDevice() 239 if (cachedDevice != null && cachedDevice.getName() != null) { in getName() 240 return cachedDevice.getName(); in getName() 255 .filter(cachedDevice -> cachedDevice.getBondState() == BluetoothDevice.BOND_NONE) in clearNonBondedDevices() 256 .forEach(cachedDevice -> { in clearNonBondedDevices() 257 cachedDevice.release(); in clearNonBondedDevices() 282 cachedDevice.setSubDevice(null); in clearNonBondedSubDevices() [all …]
|
H A D | BluetoothEventManager.java | 188 if (cachedDevice == null) { in readPairedDevices() 224 cachedDevice.onAudioModeChanged(); in dispatchAudioModeChanged() 326 if (cachedDevice == null) { in onReceive() 336 cachedDevice.setRssi(rssi); in onReceive() 374 if (cachedDevice == null) { in onReceive() 445 if (cachedDevice != null) { in onReceive() 446 cachedDevice.refresh(); in onReceive() 454 if (cachedDevice != null) { in onReceive() 455 cachedDevice.onUuidChanged(); in onReceive() 463 if (cachedDevice != null) { in onReceive() [all …]
|
H A D | HearingAidDeviceManager.java | 147 if (cachedDevice.getHiSyncId() == hiSyncId) { in getCachedDevice() 148 return cachedDevice; in getCachedDevice() 186 if (cachedDevice.getHiSyncId() != hiSyncId) { in onHiSyncIdChanged() 212 if (cachedDevice.isConnected()) { in onHiSyncIdChanged() 213 mainDevice = cachedDevice; in onHiSyncIdChanged() 219 subDevice = cachedDevice; in onHiSyncIdChanged() 259 mainDevice = findMainDevice(cachedDevice); in onProfileConnectionStateChangedIfProcessed() 260 if (cachedDevice.getUnpairing()) { in onProfileConnectionStateChangedIfProcessed() 274 cachedDevice.switchSubDeviceContent(); in onProfileConnectionStateChangedIfProcessed() 275 cachedDevice.refresh(); in onProfileConnectionStateChangedIfProcessed() [all …]
|
H A D | CsipDeviceManager.java | 116 if (cachedDevice.getGroupId() == groupId) { in getCachedDevice() 119 return cachedDevice; in getCachedDevice() 128 for (CachedBluetoothDevice cachedDevice : mCachedDevices) { in updateCsipDevices() 130 if (!isValidGroupId(cachedDevice.getGroupId())) { in updateCsipDevices() 134 cachedDevice.setGroupId(newGroupId); in updateCsipDevices() 196 for (CachedBluetoothDevice cachedDevice : mCachedDevices) { in findMainDevice() 197 if (isValidGroupId(cachedDevice.getGroupId())) { in findMainDevice() 205 return cachedDevice; in findMainDevice() 268 .filter(cachedDevice -> cachedDevice.getConnectableProfiles().stream() in getPreferredMainDevice() 270 .filter(cachedDevice -> cachedDevice.getConnectableProfiles().stream() in getPreferredMainDevice() [all …]
|
H A D | BluetoothCallback.java | 73 default void onDeviceAdded(@NonNull CachedBluetoothDevice cachedDevice) {} in onDeviceAdded() argument 80 default void onDeviceDeleted(@NonNull CachedBluetoothDevice cachedDevice) {} in onDeviceDeleted() argument 93 @NonNull CachedBluetoothDevice cachedDevice, int bondState) {} in onDeviceBondStateChanged() 110 @Nullable CachedBluetoothDevice cachedDevice, in onConnectionStateChanged() 148 @NonNull CachedBluetoothDevice cachedDevice, in onProfileConnectionStateChanged() 164 @NonNull CachedBluetoothDevice cachedDevice, int state) {} in onAclConnectionStateChanged()
|
H A D | LocalBluetoothProfileManager.java | 334 if (cachedDevice == null) { in onReceive() 336 cachedDevice = mDeviceManager.addDevice(device); in onReceive() 338 onReceiveInternal(intent, cachedDevice); in onReceive() 366 HearingAidStatsLogUtils.logHearingAidInfo(cachedDevice); in onReceiveInternal() 378 if (cachedDevice.isConnectedLeAudioHearingAidDevice()) { in onReceiveInternal() 383 cachedDevice.setHearingAidInfo(infoBuilder.build()); in onReceiveInternal() 398 cachedDevice.setGroupId(entry.getKey()); in onReceiveInternal() 406 cachedDevice.onProfileStateChanged(mProfile, newState); in onReceiveInternal() 416 cachedDevice.refresh(); in onReceiveInternal() 442 cachedDevice.refresh(); in onReceiveInternal() [all …]
|
H A D | BluetoothUtils.java | 87 CachedBluetoothDevice cachedDevice) { in getBtClassDrawableWithDescription() argument 88 BluetoothClass btClass = cachedDevice.getBtClass(); in getBtClassDrawableWithDescription() 118 List<LocalBluetoothProfile> profiles = cachedDevice.getProfiles(); in getBtClassDrawableWithDescription() 168 CachedBluetoothDevice cachedDevice) { in getBtRainbowDrawableWithDescription() argument 171 cachedDevice); in getBtRainbowDrawableWithDescription() 179 if ((cachedDevice.getGroupId() != BluetoothCsipSetCoordinator.GROUP_ID_INVALID)) { in getBtRainbowDrawableWithDescription() 180 hashCode = new Integer(cachedDevice.getGroupId()).hashCode(); in getBtRainbowDrawableWithDescription() 182 hashCode = cachedDevice.getAddress().hashCode(); in getBtRainbowDrawableWithDescription() 213 CachedBluetoothDevice cachedDevice) { in getBtDrawableWithDescription() argument 215 context, cachedDevice); in getBtDrawableWithDescription() [all …]
|
H A D | CachedBluetoothDevice.java | 663 .mapToInt(cachedDevice -> cachedDevice.getBatteryLevel()) in getMinBatteryLevelWithMemberDevices()
|
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/ |
H A D | LocalMediaManager.java | 170 final CachedBluetoothDevice cachedDevice = in connectDevice() local 172 if (!cachedDevice.isConnected() && !cachedDevice.isBusy()) { in connectDevice() 175 cachedDevice.connect(); in connectDevice() 558 final CachedBluetoothDevice cachedDevice = in getMutingExpectedDevice() local 560 if (isBondedMediaDevice(cachedDevice) && isMutingExpectedDevice(cachedDevice)) { in getMutingExpectedDevice() 562 cachedDevice, in getMutingExpectedDevice() 593 if (cachedDevice != null) { in buildDisconnectedBluetoothDevice() 610 cachedDevice, in buildDisconnectedBluetoothDevice() 621 return cachedDevice != null in isBondedMediaDevice() 623 && !cachedDevice.isConnected() in isBondedMediaDevice() [all …]
|
H A D | MediaDeviceUtils.java | 34 public static String getId(CachedBluetoothDevice cachedDevice) { in getId() argument 35 if (cachedDevice.isHearingAidDevice()) { in getId() 36 if (cachedDevice.getHiSyncId() != BluetoothHearingAid.HI_SYNC_ID_INVALID) { in getId() 37 return Long.toString(cachedDevice.getHiSyncId()); in getId() 40 return cachedDevice.getAddress(); in getId()
|
H A D | InfoMediaManager.java | 581 final CachedBluetoothDevice cachedDevice = in addMediaDevice() local 583 if (cachedDevice != null) { in addMediaDevice() 585 ? new BluetoothMediaDevice(mContext, cachedDevice, mRouterManager, in addMediaDevice() 587 : new BluetoothMediaDevice(mContext, cachedDevice, mRouterManager, in addMediaDevice()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ |
H A D | BluetoothTileTest.kt | 145 val cachedDevice = mock<CachedBluetoothDevice>() regex 147 listenToDeviceMetadata(state, cachedDevice, 50) 165 val cachedDevice = mock<CachedBluetoothDevice>() regex 166 listenToDeviceMetadata(state, cachedDevice, 50) 190 val cachedDevice = mock<CachedBluetoothDevice>() regex 191 listenToDeviceMetadata(state, cachedDevice, 50) 203 val cachedDevice = mock<CachedBluetoothDevice>() regex 204 listenToDeviceMetadata(state, cachedDevice, 50) 275 cachedDevice: CachedBluetoothDevice, 279 whenever(cachedDevice.device).thenReturn(btDevice) [all …]
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
H A D | BluetoothControllerImpl.java | 357 mLogger.logDeviceAdded(cachedDevice.getAddress()); in onDeviceAdded() 358 cachedDevice.registerCallback(this); in onDeviceAdded() 365 mLogger.logDeviceDeleted(cachedDevice.getAddress()); in onDeviceDeleted() 372 @NonNull CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() 387 @Nullable CachedBluetoothDevice cachedDevice, in onConnectionStateChanged() 397 @NonNull CachedBluetoothDevice cachedDevice, in onProfileConnectionStateChanged() 416 @NonNull CachedBluetoothDevice cachedDevice, int state) { in onAclConnectionStateChanged() 424 @NonNull CachedBluetoothDevice cachedDevice, in addOnMetadataChangedListener() 430 cachedDevice.getDevice(), in addOnMetadataChangedListener() 437 @NonNull CachedBluetoothDevice cachedDevice, in removeOnMetadataChangedListener() [all …]
|
/aosp14/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
H A D | LocalMediaManagerTest.java | 190 when(cachedDevice.isConnected()).thenReturn(false); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice() 191 when(cachedDevice.isBusy()).thenReturn(false); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice() 196 verify(cachedDevice).connect(); in connectDevice_bluetoothDeviceNotConnected_connectBluetoothDevice() 393 when(cachedDevice.isConnected()).thenReturn(false); in onDeviceAttributesChanged_failingTransferring_shouldResetState() 394 when(cachedDevice.isBusy()).thenReturn(false); in onDeviceAttributesChanged_failingTransferring_shouldResetState() 468 when(cachedDevice.isConnected()).thenReturn(false); in onDeviceListAdded_haveMutingExpectedDevice_addMutingExpectedDevice() 470 when(cachedDevice.getDevice()).thenReturn(bluetoothDevice); in onDeviceListAdded_haveMutingExpectedDevice_addMutingExpectedDevice() 471 when(cachedDevice.getAddress()).thenReturn(TEST_ADDRESS); in onDeviceListAdded_haveMutingExpectedDevice_addMutingExpectedDevice() 498 when(cachedDevice.isConnected()).thenReturn(false); in onDeviceListAdded_transferToDisconnectedBluetooth_verifyConnectDevice() 499 when(cachedDevice.isBusy()).thenReturn(false); in onDeviceListAdded_transferToDisconnectedBluetooth_verifyConnectDevice() [all …]
|
H A D | InfoMediaManagerTest.java | 1009 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in addMediaDevice_verifyDeviceTypeCanCorrespondToMediaDevice() local 1034 .thenReturn(cachedDevice); in addMediaDevice_verifyDeviceTypeCanCorrespondToMediaDevice() 1069 final CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in addMediaDevice_deviceIncludedInSelectedDevices_shouldSetAsCurrentConnected() local 1082 .thenReturn(cachedDevice); in addMediaDevice_deviceIncludedInSelectedDevices_shouldSetAsCurrentConnected()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/keyboard/ |
H A D | KeyboardUI.java | 330 CachedBluetoothDevice cachedDevice = mCachedDeviceManager.findDevice(d); in getCachedBluetoothDevice() local 331 if (cachedDevice == null) { in getCachedBluetoothDevice() 332 cachedDevice = mCachedDeviceManager.addDevice(d); in getCachedBluetoothDevice() 334 return cachedDevice; in getCachedBluetoothDevice() 507 CachedBluetoothDevice cachedDevice = getCachedBluetoothDevice(d); in handleMessage() local 508 onDeviceAddedInternal(cachedDevice); in handleMessage() 609 @NonNull CachedBluetoothDevice cachedDevice, int bondState) { in onDeviceBondStateChanged() 611 bondState, 0, cachedDevice).sendToTarget(); in onDeviceBondStateChanged()
|
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ |
H A D | BluetoothControllerImplTest.java | 443 CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in testAddOnMetadataChangedListener_registersListenerOnAdapter() local 445 when(cachedDevice.getDevice()).thenReturn(device); in testAddOnMetadataChangedListener_registersListenerOnAdapter() 450 mBluetoothControllerImpl.addOnMetadataChangedListener(cachedDevice, executor, listener); in testAddOnMetadataChangedListener_registersListenerOnAdapter() 457 CachedBluetoothDevice cachedDevice = mock(CachedBluetoothDevice.class); in testRemoveOnMetadataChangedListener_removesListenerFromAdapter() local 459 when(cachedDevice.getDevice()).thenReturn(device); in testRemoveOnMetadataChangedListener_removesListenerFromAdapter() 463 mBluetoothControllerImpl.removeOnMetadataChangedListener(cachedDevice, listener); in testRemoveOnMetadataChangedListener_removesListenerFromAdapter()
|
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tiles/ |
H A D | BluetoothTile.java | 274 private void listenToMetadata(CachedBluetoothDevice cachedDevice) { in listenToMetadata() argument 275 if (cachedDevice == mMetadataRegisteredDevice) return; in listenToMetadata() 278 mController.addOnMetadataChangedListener(cachedDevice, in listenToMetadata() 281 mMetadataRegisteredDevice = cachedDevice; in listenToMetadata()
|