/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
H A D | A2dpProfile.java | 222 if (bluetoothDevice == null) { in supportsHighQualityAudio() 225 int support = mService.isOptionalCodecsSupported(bluetoothDevice); in supportsHighQualityAudio() 231 if (bluetoothDevice == null) { in isHighQualityAudioEnabled() 234 int enabled = mService.isOptionalCodecsEnabled(bluetoothDevice); in isHighQualityAudioEnabled() 238 && supportsHighQualityAudio(bluetoothDevice)) { in isHighQualityAudioEnabled() 245 if (mService.getCodecStatus(bluetoothDevice) != null) { in isHighQualityAudioEnabled() 257 if (bluetoothDevice == null) { in setHighQualityAudioEnabled() 263 mService.setOptionalCodecsEnabled(bluetoothDevice, prefValue); in setHighQualityAudioEnabled() 268 mService.enableOptionalCodecs(bluetoothDevice); in setHighQualityAudioEnabled() 270 mService.disableOptionalCodecs(bluetoothDevice); in setHighQualityAudioEnabled() [all …]
|
H A D | BluetoothUtils.java | 184 final BluetoothDevice bluetoothDevice = cachedDevice.getDevice(); in getBtDrawableWithDescription() local 190 if (isAdvancedDetailsHeader(bluetoothDevice)) { in getBtDrawableWithDescription() 191 final Uri iconUri = getUriMetaData(bluetoothDevice, in getBtDrawableWithDescription() 239 String deviceType = getStringMetaData(bluetoothDevice, in isAdvancedDetailsHeader() 315 if (bluetoothDevice == null) { in getBooleanMetaData() 318 final byte[] data = bluetoothDevice.getMetadata(key); in getBooleanMetaData() 333 if (bluetoothDevice == null) { in getStringMetaData() 336 final byte[] data = bluetoothDevice.getMetadata(key); in getStringMetaData() 351 if (bluetoothDevice == null) { in getIntMetaData() 354 final byte[] data = bluetoothDevice.getMetadata(key); in getIntMetaData() [all …]
|
/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
H A D | BluetoothMediaDeviceTest.java | 77 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in isFastPairDevice_isUntetheredHeadset_returnTrue() local 78 when(mDevice.getDevice()).thenReturn(bluetoothDevice); in isFastPairDevice_isUntetheredHeadset_returnTrue() 82 when(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)) in isFastPairDevice_isUntetheredHeadset_returnTrue() 90 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in isFastPairDevice_isNotUntetheredHeadset_returnFalse() local 91 when(mDevice.getDevice()).thenReturn(bluetoothDevice); in isFastPairDevice_isNotUntetheredHeadset_returnFalse() 95 when(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)) in isFastPairDevice_isNotUntetheredHeadset_returnFalse() 103 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in getIcon_isNotFastPairDevice_drawableTypeIsNotBitmapDrawable() local 104 when(mDevice.getDevice()).thenReturn(bluetoothDevice); in getIcon_isNotFastPairDevice_drawableTypeIsNotBitmapDrawable() 108 when(bluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)) in getIcon_isNotFastPairDevice_drawableTypeIsNotBitmapDrawable()
|
H A D | LocalMediaManagerTest.java | 570 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in onDeviceListAdded_haveDisconnectedDevice_addDisconnectedDevice() local 573 bluetoothDevices.add(bluetoothDevice); in onDeviceListAdded_haveDisconnectedDevice_addDisconnectedDevice() 577 when(cachedManager.findDevice(bluetoothDevice)).thenReturn(cachedDevice); in onDeviceListAdded_haveDisconnectedDevice_addDisconnectedDevice() 581 when(cachedDevice.getDevice()).thenReturn(bluetoothDevice); in onDeviceListAdded_haveDisconnectedDevice_addDisconnectedDevice() 582 when(mA2dpProfile.getActiveDevice()).thenReturn(bluetoothDevice); in onDeviceListAdded_haveDisconnectedDevice_addDisconnectedDevice() 653 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in onDeviceListAdded_haveDisconnectedDevice_list5DisconnectedDevice() local 662 bluetoothDevices.add(bluetoothDevice); in onDeviceListAdded_haveDisconnectedDevice_list5DisconnectedDevice() 671 when(cachedManager.findDevice(bluetoothDevice)).thenReturn(cachedDevice); in onDeviceListAdded_haveDisconnectedDevice_list5DisconnectedDevice() 679 when(cachedDevice.getDevice()).thenReturn(bluetoothDevice); in onDeviceListAdded_haveDisconnectedDevice_list5DisconnectedDevice() 681 when(bluetoothDevice.getBluetoothClass()).thenReturn(bluetoothClass); in onDeviceListAdded_haveDisconnectedDevice_list5DisconnectedDevice()
|
/aosp12/packages/apps/Car/Dialer/src/com/android/car/dialer/bluetooth/ |
H A D | PhoneAccountManager.java | 85 for (BluetoothDevice bluetoothDevice : bondedDevices) { in getMatchingDevice() 86 if (TextUtils.equals(bluetoothDevice.getAddress(), phoneAccountHandle.getId())) { in getMatchingDevice() 87 return bluetoothDevice; in getMatchingDevice() 101 BluetoothDevice bluetoothDevice = getMatchingDevice(phoneAccountHandle); in getHfpDeviceList() local 102 if (bluetoothDevice != null) { in getHfpDeviceList() 103 hfpDeviceList.add(bluetoothDevice); in getHfpDeviceList() 110 public PhoneAccountHandle getMatchingPhoneAccount(@Nullable BluetoothDevice bluetoothDevice) { in getMatchingPhoneAccount() argument 111 if (bluetoothDevice == null) { in getMatchingPhoneAccount() 119 if (TextUtils.equals(phoneAccountHandle.getId(), bluetoothDevice.getAddress())) { in getMatchingPhoneAccount()
|
/aosp12/frameworks/base/media/packages/BluetoothMidiService/src/com/android/bluetoothmidiservice/ |
H A 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);
|
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
H A D | DevicePickerFragmentTest.java | 74 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage() local 76 when(cachedDevice.getDevice()).thenReturn(bluetoothDevice); in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage() 77 mFragment.mSelectedDevice = bluetoothDevice; in callingPackageIsEqualToLaunchPackage_sendBroadcastToLaunchPackage() 93 final BluetoothDevice bluetoothDevice = mock(BluetoothDevice.class); in callingPackageIsNotEqualToLaunchPackage_broadcastNotSend() local 95 when(cachedDevice.getDevice()).thenReturn(bluetoothDevice); in callingPackageIsNotEqualToLaunchPackage_broadcastNotSend() 96 mFragment.mSelectedDevice = bluetoothDevice; in callingPackageIsNotEqualToLaunchPackage_broadcastNotSend()
|
/aosp12/packages/apps/Settings/src/com/android/settings/development/ |
H A D | AbstractBluetoothA2dpPreferenceController.java | 186 BluetoothDevice bluetoothDevice = in setCodecConfigPreference() local 188 if (bluetoothDevice == null) { in setCodecConfigPreference() 191 mBluetoothA2dp.setCodecConfigPreference(bluetoothDevice, config); in setCodecConfigPreference() 197 BluetoothDevice bluetoothDevice = in getCodecConfig() local 199 if (bluetoothDevice == null) { in getCodecConfig() 202 BluetoothCodecStatus codecStatus = mBluetoothA2dp.getCodecStatus(bluetoothDevice); in getCodecConfig()
|
/aosp12/packages/apps/Settings/src/com/android/settings/bluetooth/ |
H A D | BluetoothDetailsProfilesController.java | 142 final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in enableProfile() local 144 bluetoothDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in enableProfile() 149 bluetoothDevice.setMessageAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in enableProfile() 151 profile.setEnabled(bluetoothDevice, true); in enableProfile() 158 final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in disableProfile() local 159 profile.setEnabled(bluetoothDevice, false); in disableProfile() 161 bluetoothDevice.setMessageAccessPermission(BluetoothDevice.ACCESS_REJECTED); in disableProfile() 163 bluetoothDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED); in disableProfile()
|
H A D | AdvancedBluetoothDetailsHeaderController.java | 257 final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in updateSubLayout() local 258 final String iconUri = BluetoothUtils.getStringMetaData(bluetoothDevice, iconMetaKey); in updateSubLayout() 268 final int batteryLevel = BluetoothUtils.getIntMetaData(bluetoothDevice, batteryMetaKey); in updateSubLayout() 279 if (isUntetheredHeadset(bluetoothDevice)) { in updateSubLayout() 285 int lowBatteryLevel = BluetoothUtils.getIntMetaData(bluetoothDevice, in updateSubLayout() 299 int level = bluetoothDevice.getBatteryLevel(); in updateSubLayout() 325 private boolean isUntetheredHeadset(BluetoothDevice bluetoothDevice) { in isUntetheredHeadset() argument 326 return BluetoothUtils.getBooleanMetaData(bluetoothDevice, in isUntetheredHeadset() 328 || TextUtils.equals(BluetoothUtils.getStringMetaData(bluetoothDevice, in isUntetheredHeadset() 431 final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in updateDisconnectLayout() local [all …]
|
H A D | BluetoothFeatureProviderImpl.java | 35 public Uri getBluetoothDeviceSettingsUri(BluetoothDevice bluetoothDevice) { in getBluetoothDeviceSettingsUri() argument 36 final byte[] uriByte = bluetoothDevice.getMetadata( in getBluetoothDeviceSettingsUri()
|
H A D | Utils.java | 167 public static boolean isAdvancedDetailsHeader(@NonNull BluetoothDevice bluetoothDevice) { in isAdvancedDetailsHeader() argument 175 final boolean untetheredHeadset = BluetoothUtils.getBooleanMetaData(bluetoothDevice, in isAdvancedDetailsHeader() 182 final String deviceType = BluetoothUtils.getStringMetaData(bluetoothDevice, in isAdvancedDetailsHeader()
|
H A D | BluetoothFeatureProvider.java | 32 Uri getBluetoothDeviceSettingsUri(BluetoothDevice bluetoothDevice); in getBluetoothDeviceSettingsUri() argument
|
/aosp12/packages/apps/Dialer/java/com/android/incallui/audioroute/ |
H A D | AudioRouteSelectorDialogFragment.java | 177 private TextView createBluetoothItem(BluetoothDevice bluetoothDevice, boolean selected) { in createBluetoothItem() argument 181 textView.setText(getAliasName(bluetoothDevice)); in createBluetoothItem() 196 TelecomAdapter.getInstance().requestBluetoothAudio(bluetoothDevice); in createBluetoothItem() 204 private String getAliasName(BluetoothDevice bluetoothDevice) { in getAliasName() argument 206 Method getActiveDeviceMethod = bluetoothDevice.getClass().getDeclaredMethod("getAliasName"); in getAliasName() 208 return (String) getActiveDeviceMethod.invoke(bluetoothDevice); in getAliasName() 211 return bluetoothDevice.getName(); in getAliasName()
|
/aosp12/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/ |
H A D | BluetoothDevicesSlice.java | 345 SliceAction buildPrimaryBluetoothAction(CachedBluetoothDevice bluetoothDevice) { in buildPrimaryBluetoothAction() argument 348 .putExtra(BLUETOOTH_DEVICE_HASH_CODE, bluetoothDevice.hashCode()); in buildPrimaryBluetoothAction() 351 PendingIntent.getBroadcast(mContext, bluetoothDevice.hashCode(), intent, in buildPrimaryBluetoothAction() 353 getBluetoothDeviceIcon(bluetoothDevice), in buildPrimaryBluetoothAction() 355 bluetoothDevice.getName()); in buildPrimaryBluetoothAction() 359 SliceAction buildBluetoothDetailDeepLinkAction(CachedBluetoothDevice bluetoothDevice) { in buildBluetoothDetailDeepLinkAction() argument 361 getBluetoothDetailIntent(bluetoothDevice), in buildBluetoothDetailDeepLinkAction() 364 bluetoothDevice.getName()); in buildBluetoothDetailDeepLinkAction()
|
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/ |
H A D | MediaDeviceUtils.java | 46 public static String getId(BluetoothDevice bluetoothDevice) { in getId() argument 47 return bluetoothDevice.getAddress(); in getId()
|
/aosp12/frameworks/base/services/midi/java/com/android/server/midi/ |
H A D | MidiService.java | 316 public Device(BluetoothDevice bluetoothDevice) { in Device() argument 317 mBluetoothDevice = bluetoothDevice; in Device() 682 public void openBluetoothDevice(IBinder token, BluetoothDevice bluetoothDevice, in openBluetoothDevice() argument 690 device = mBluetoothDevices.get(bluetoothDevice); in openBluetoothDevice() 692 device = new Device(bluetoothDevice); in openBluetoothDevice() 693 mBluetoothDevices.put(bluetoothDevice, device); in openBluetoothDevice() 811 BluetoothDevice bluetoothDevice = null; in addDeviceLocked() local 813 bluetoothDevice = (BluetoothDevice)properties.getParcelable( in addDeviceLocked() 815 device = mBluetoothDevices.get(bluetoothDevice); in addDeviceLocked() 824 if (bluetoothDevice != null) { in addDeviceLocked() [all …]
|
/aosp12/packages/apps/Settings/src/com/android/settings/development/bluetooth/ |
H A D | AbstractBluetoothDialogPreferenceController.java | 178 BluetoothDevice bluetoothDevice = in getSelectableConfigs() local 180 if (bluetoothDevice == null) { in getSelectableConfigs() 183 final BluetoothCodecStatus codecStatus = bluetoothA2dp.getCodecStatus(bluetoothDevice); in getSelectableConfigs()
|
/aosp12/packages/apps/Dialer/java/com/android/incallui/call/ |
H A D | TelecomAdapter.java | 200 public void requestBluetoothAudio(BluetoothDevice bluetoothDevice) { in requestBluetoothAudio() argument 202 inCallService.requestBluetoothAudio(bluetoothDevice); in requestBluetoothAudio()
|
/aosp12/frameworks/base/media/java/android/media/midi/ |
H A D | IBluetoothMidiService.aidl | 25 IBinder addBluetoothDevice(in BluetoothDevice bluetoothDevice); in addBluetoothDevice() argument
|
H A D | MidiManager.java | 282 public void openBluetoothDevice(BluetoothDevice bluetoothDevice, in openBluetoothDevice() argument 305 mService.openBluetoothDevice(mToken, bluetoothDevice, callback); in openBluetoothDevice()
|
H A D | IMidiManager.aidl | 39 void openBluetoothDevice(IBinder clientToken, in BluetoothDevice bluetoothDevice, in openBluetoothDevice() argument
|
/aosp12/frameworks/base/telecomm/java/android/telecom/ |
H A D | InCallService.java | 577 public final void requestBluetoothAudio(@NonNull BluetoothDevice bluetoothDevice) { in requestBluetoothAudio() argument 579 mPhone.requestBluetoothAudio(bluetoothDevice.getAddress()); in requestBluetoothAudio()
|
H A D | Connection.java | 3052 public void requestBluetoothAudio(@NonNull BluetoothDevice bluetoothDevice) { in requestBluetoothAudio() argument 3055 bluetoothDevice.getAddress()); in requestBluetoothAudio()
|
/aosp12/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/bluetooth/ |
H A D | MapMceTestFragment.java | 145 mBluetoothDevice = (TextView) v.findViewById(R.id.bluetoothDevice); in onCreateView()
|