Home
last modified time | relevance | path

Searched refs:bluetoothDevice (Results 1 – 25 of 44) sorted by relevance

12

/packages/modules/Bluetooth/android/pandora/server/src/
DHost.kt230 private suspend fun waitPairingRequestIntent(bluetoothDevice: BluetoothDevice) { in waitPairingRequestIntent()
231 Log.i(TAG, "waitPairingRequestIntent: device=$bluetoothDevice") in waitPairingRequestIntent()
235 .filter { it.getBluetoothDeviceExtra() == bluetoothDevice } in waitPairingRequestIntent()
247 bluetoothDevice.setPairingConfirmation(true) in waitPairingRequestIntent()
251 private suspend fun waitConnectionIntent(bluetoothDevice: BluetoothDevice) { in waitConnectionIntent()
252 Log.i(TAG, "waitConnectionIntent: device=$bluetoothDevice") in waitConnectionIntent()
255 .filter { it.getBluetoothDeviceExtra() == bluetoothDevice } in waitConnectionIntent()
261 suspend fun waitBondIntent(bluetoothDevice: BluetoothDevice) { in waitBondIntent()
265 Log.i(TAG, "waitBondIntent: device=$bluetoothDevice") in waitBondIntent()
268 .filter { it.getBluetoothDeviceExtra() == bluetoothDevice } in waitBondIntent()
[all …]
DSecurity.kt79 val bluetoothDevice = intent.getBluetoothDeviceExtra() in <lambda>() constant
92 bluetoothDevice.setPairingConfirmation(true) in <lambda>()
118 val bluetoothDevice = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>() constant
120 Log.i(TAG, "secure: $bluetoothDevice transport: $transport") in <lambda>()
130 bluetoothDevice.createBond(transport) in <lambda>()
131 waitLESecurityLevel(bluetoothDevice, level) in <lambda>()
141 bluetoothDevice.createBond(transport) in <lambda>()
142 waitBREDRSecurityLevel(bluetoothDevice, level) in <lambda>()
154 suspend fun waitBondIntent(bluetoothDevice: BluetoothDevice): Int { in <lambda>()
155 if (bluetoothDevice.getBondState() == BOND_BONDED) { in <lambda>()
[all …]
DOpp.kt91 val bluetoothDevice = request.address.toBluetoothDevice(bluetoothAdapter) in openRfcommChannel() constant
92 sendFile(bluetoothDevice) in openRfcommChannel()
102 val bluetoothDevice = request.address.toBluetoothDevice(bluetoothAdapter) in openL2capChannel() constant
103 sendFile(bluetoothDevice) in openL2capChannel()
132 private suspend fun sendFile(bluetoothDevice: BluetoothDevice) { in sendFile()
134 waitBluetoothDevice(bluetoothDevice) in sendFile()
136 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, bluetoothDevice) in sendFile()
140 suspend private fun waitBluetoothDevice(bluetoothDevice: BluetoothDevice) { in waitBluetoothDevice()
145 it.getBluetoothDeviceExtra() == bluetoothDevice in waitBluetoothDevice()
DSecurityStorage.kt95 val bluetoothDevice = in deleteBond() constant
97 Log.i(TAG, "deleteBond: device=$bluetoothDevice") in deleteBond()
103 .filter { it.getBluetoothDeviceExtra() == bluetoothDevice } in deleteBond()
113 if (bluetoothDevice.removeBond()) { in deleteBond()
114 Log.i(TAG, "deleteBond: device=$bluetoothDevice - wait BOND_NONE intent") in deleteBond()
117 Log.i(TAG, "deleteBond: device=$bluetoothDevice - Already unpaired") in deleteBond()
DOs.kt56 val bluetoothDevice = request.address.toBluetoothDevice(bluetoothAdapter) in setAccessPermission() constant
59 bluetoothDevice.setMessageAccessPermission(BluetoothDevice.ACCESS_ALLOWED) in setAccessPermission()
61 bluetoothDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED) in setAccessPermission()
63 bluetoothDevice.setSimAccessPermission(BluetoothDevice.ACCESS_ALLOWED) in setAccessPermission()
/packages/modules/Uwb/ranging/tests/multidevices/snippet/bluetooth/
DBluetoothGattMultiDevicesSnippet.java62 for (BluetoothDevice bluetoothDevice : in reset()
64 removeBondImplBtDevice(bluetoothDevice); in reset()
139 BluetoothDevice bluetoothDevice = in removeBondImpl() local
141 if (bluetoothDevice == null) { in removeBondImpl()
142 Log.e(TAG, "Failed to find remove device: " + bluetoothDevice); in removeBondImpl()
145 return removeBondImplBtDevice(bluetoothDevice); in removeBondImpl()
150 private boolean removeBondImplBtDevice(BluetoothDevice bluetoothDevice) { in removeBondImplBtDevice() argument
155 BOND_NONE, bluetoothDevice, bondingBlocker); in removeBondImplBtDevice()
157 if (!bluetoothDevice.removeBond()) { in removeBondImplBtDevice()
/packages/apps/Car/Settings/src/com/android/car/settings/sound/
DAudioRouteItem.java44 public AudioRouteItem(CachedBluetoothDevice bluetoothDevice) { in AudioRouteItem() argument
45 mName = bluetoothDevice.getName(); in AudioRouteItem()
46 mAddress = bluetoothDevice.getAddress(); in AudioRouteItem()
48 mBluetoothDevice = bluetoothDevice; in AudioRouteItem()
80 public void setBluetoothDevice(CachedBluetoothDevice bluetoothDevice) { in setBluetoothDevice() argument
81 mBluetoothDevice = bluetoothDevice; in setBluetoothDevice()
DAudioRoutesManager.java150 for (CachedBluetoothDevice bluetoothDevice : bluetoothDevices) { in updateAudioRoutesList()
151 if (bluetoothDevice.isConnectedA2dpDevice()) { in updateAudioRoutesList()
152 if (mAudioRouteItemMap.containsKey(bluetoothDevice.getAddress())) { in updateAudioRoutesList()
153 mAudioRouteItemMap.get(bluetoothDevice.getAddress()) in updateAudioRoutesList()
154 .setBluetoothDevice(bluetoothDevice); in updateAudioRoutesList()
155 mAudioRouteItemMap.get(bluetoothDevice.getAddress()) in updateAudioRoutesList()
158 AudioRouteItem audioRouteItem = new AudioRouteItem(bluetoothDevice); in updateAudioRoutesList()
236 CachedBluetoothDevice bluetoothDevice = audioRouteItem.getBluetoothDevice(); in updateAudioRoute() local
237 if (bluetoothDevice.isActiveDevice(BluetoothProfile.A2DP)) { in updateAudioRoute()
240 bluetoothDevice.setActive(); in updateAudioRoute()
/packages/apps/Car/VoiceControl/src/com/android/car/
DTelecomUtils.java56 BluetoothDevice bluetoothDevice = getMatchingDevice(phoneAccountHandle); in getHfpDeviceList() local
57 if (bluetoothDevice != null) { in getHfpDeviceList()
58 hfpDeviceList.add(bluetoothDevice); in getHfpDeviceList()
76 for (BluetoothDevice bluetoothDevice : bondedDevices) { in getMatchingDevice()
77 if (TextUtils.equals(bluetoothDevice.getAddress(), phoneAccountHandle.getId())) { in getMatchingDevice()
78 return bluetoothDevice; in getMatchingDevice()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DDevicePickerFragmentTest.java74 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()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/
DSilenceDeviceManager.java153 BluetoothDevice bluetoothDevice = (BluetoothDevice) msg.obj; in handleMessage() local
159 addConnectedDevice(bluetoothDevice, BluetoothProfile.HEADSET); in handleMessage()
160 if (!mSilenceDevices.containsKey(bluetoothDevice)) { in handleMessage()
161 mSilenceDevices.put(bluetoothDevice, false); in handleMessage()
165 removeConnectedDevice(bluetoothDevice, BluetoothProfile.HEADSET); in handleMessage()
166 if (!isBluetoothAudioConnected(bluetoothDevice)) { in handleMessage()
167 handleSilenceDeviceStateChanged(bluetoothDevice, false); in handleMessage()
168 mSilenceDevices.remove(bluetoothDevice); in handleMessage()
DRemoteDevices.java201 BluetoothDevice bluetoothDevice = deviceProperties.getDevice(); in reset() local
207 + bluetoothDevice.isConnected()); in reset()
209 if (bluetoothDevice.isConnected()) { in reset()
216 mAdapterService.notifyAclDisconnected(bluetoothDevice, transport); in reset()
218 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, bluetoothDevice); in reset()
1579 BluetoothDevice bluetoothDevice = getDevice(address); in keyMissingCallback() local
1580 if (bluetoothDevice == null) { in keyMissingCallback()
1586 Log.i(TAG, "keyMissingCallback device: " + bluetoothDevice); in keyMissingCallback()
1588 if (getBondState(bluetoothDevice) == BluetoothDevice.BOND_BONDED) { in keyMissingCallback()
1591 .putExtra(BluetoothDevice.EXTRA_DEVICE, bluetoothDevice) in keyMissingCallback()
[all …]
/packages/services/Telecomm/src/com/android/server/telecom/
DCallAudioRouteController.java271 BluetoothDevice bluetoothDevice; in CallAudioRouteController()
301 bluetoothDevice = (BluetoothDevice) ((SomeArgs) msg.obj).arg2; in CallAudioRouteController()
302 handleBtConnected(type, bluetoothDevice); in CallAudioRouteController()
306 bluetoothDevice = (BluetoothDevice) ((SomeArgs) msg.obj).arg2; in CallAudioRouteController()
307 handleBtDisconnected(type, bluetoothDevice); in CallAudioRouteController()
348 bluetoothDevice = (BluetoothDevice) ((SomeArgs) msg.obj).arg2; in CallAudioRouteController()
349 handleBtAudioActive(bluetoothDevice); in CallAudioRouteController()
352 bluetoothDevice = (BluetoothDevice) ((SomeArgs) msg.obj).arg2; in CallAudioRouteController()
353 handleBtAudioInactive(bluetoothDevice); in CallAudioRouteController()
504 public void sendMessageWithSessionInfo(int message, int arg, BluetoothDevice bluetoothDevice) { in sendMessageWithSessionInfo() argument
[all …]
/packages/apps/Settings/src/com/android/settings/bluetooth/
DBluetoothFeatureProviderImpl.kt41 override fun getBluetoothDeviceSettingsUri(bluetoothDevice: BluetoothDevice): Uri? { in getBluetoothDeviceSettingsUri()
42 val uriByte = bluetoothDevice.getMetadata(BluetoothDevice.METADATA_ENHANCED_SETTINGS_UI_URI) in getBluetoothDeviceSettingsUri()
46 override fun getBluetoothDeviceControlUri(bluetoothDevice: BluetoothDevice): String? { in getBluetoothDeviceControlUri()
47 return BluetoothUtils.getControlUriMetaData(bluetoothDevice) in getBluetoothDeviceControlUri()
68 bluetoothDevice: BluetoothDevice in getInvisibleProfilePreferenceKeys()
DAdvancedBluetoothDetailsHeaderController.java411 BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in updateSubLayout() local
414 () -> BluetoothUtils.getStringMetaData(bluetoothDevice, iconMetaKey)); in updateSubLayout()
417 () -> BluetoothUtils.getIntMetaData(bluetoothDevice, batteryMetaKey)); in updateSubLayout()
420 () -> BluetoothUtils.getBooleanMetaData(bluetoothDevice, chargeMetaKey)); in updateSubLayout()
426 bluetoothDevice, lowBatteryMetaKey); in updateSubLayout()
438 Suppliers.memoize(() -> isUntetheredHeadset(bluetoothDevice)); in updateSubLayout()
439 Supplier<Integer> nativeBatteryLevel = Suppliers.memoize(bluetoothDevice::getBatteryLevel); in updateSubLayout()
480 final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in updateSubLayoutUi() local
495 Log.d(TAG, "buletoothDevice: " + bluetoothDevice.getAnonymizedAddress() in updateSubLayoutUi()
557 private boolean isUntetheredHeadset(BluetoothDevice bluetoothDevice) { in isUntetheredHeadset() argument
[all …]
DBluetoothFeatureProvider.java49 Uri getBluetoothDeviceSettingsUri(BluetoothDevice bluetoothDevice); in getBluetoothDeviceSettingsUri() argument
57 String getBluetoothDeviceControlUri(BluetoothDevice bluetoothDevice); in getBluetoothDeviceControlUri() argument
91 Set<String> getInvisibleProfilePreferenceKeys(Context context, BluetoothDevice bluetoothDevice); in getInvisibleProfilePreferenceKeys() argument
DBluetoothDetailsProfilesController.java266 final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in enableProfile() local
268 bluetoothDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in enableProfile()
273 bluetoothDevice.setMessageAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in enableProfile()
281 profile.setEnabled(bluetoothDevice, true); in enableProfile()
293 final BluetoothDevice bluetoothDevice = mCachedDevice.getDevice(); in disableProfile() local
294 profile.setEnabled(bluetoothDevice, false); in disableProfile()
297 bluetoothDevice.setMessageAccessPermission(BluetoothDevice.ACCESS_REJECTED); in disableProfile()
299 bluetoothDevice.setPhonebookAccessPermission(BluetoothDevice.ACCESS_REJECTED); in disableProfile()
DBluetoothKeyMissingReceiver.java114 private void showNotification(Context context, BluetoothDevice bluetoothDevice) { in showNotification() argument
127 getKeyMissingDialogIntent(context, bluetoothDevice), in showNotification()
139 R.string.bluetooth_key_missing_title, bluetoothDevice.getAlias())) in showNotification()
/packages/apps/Dialer/java/com/android/incallui/audioroute/
DAudioRouteSelectorDialogFragment.java177 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()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DBluetoothDevicesSlice.java346 SliceAction buildPrimaryBluetoothAction(CachedBluetoothDevice bluetoothDevice) { in buildPrimaryBluetoothAction() argument
349 .putExtra(BLUETOOTH_DEVICE_HASH_CODE, bluetoothDevice.hashCode()); in buildPrimaryBluetoothAction()
352 PendingIntent.getBroadcast(mContext, bluetoothDevice.hashCode(), intent, in buildPrimaryBluetoothAction()
354 getBluetoothDeviceIcon(bluetoothDevice), in buildPrimaryBluetoothAction()
356 bluetoothDevice.getName()); in buildPrimaryBluetoothAction()
360 SliceAction buildBluetoothDetailDeepLinkAction(CachedBluetoothDevice bluetoothDevice) { in buildBluetoothDetailDeepLinkAction() argument
362 getBluetoothDetailIntent(bluetoothDevice), in buildBluetoothDetailDeepLinkAction()
365 bluetoothDevice.getName()); in buildBluetoothDetailDeepLinkAction()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/
DMetricsLoggerTest.java210 BluetoothDevice bluetoothDevice = getTestDevice(0); in testOuiFromBluetoothDevice() local
213 mTestableMetricsLogger.getRemoteDeviceInfoProto(bluetoothDevice); in testOuiFromBluetoothDevice()
256 BluetoothDevice bluetoothDevice = getTestDevice(0); in testUpdateHearingDeviceActiveTime() local
267 logger.updateHearingDeviceActiveTime(bluetoothDevice, 1); in testUpdateHearingDeviceActiveTime()
275 logger.updateHearingDeviceActiveTime(bluetoothDevice, 1); in testUpdateHearingDeviceActiveTime()
283 logger.updateHearingDeviceActiveTime(bluetoothDevice, 1); in testUpdateHearingDeviceActiveTime()
/packages/modules/Bluetooth/android/app/tests/instrumentation/com/android/bluetooth/pan/
DBluetoothTetheringNetworkFactoryTest.java87 BluetoothDevice bluetoothDevice = getTestDevice(11); in networkStartReverseTetherStop() local
88 bluetoothDevices.add(bluetoothDevice); in networkStartReverseTetherStop()
95 verify(mPanService).disconnect(bluetoothDevice); in networkStartReverseTetherStop()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/
DAccessoryUtils.java165 static String getHtmlEscapedDeviceName(@Nullable BluetoothDevice bluetoothDevice) { in getHtmlEscapedDeviceName() argument
166 if (bluetoothDevice == null || bluetoothDevice.getName() == null) { in getHtmlEscapedDeviceName()
169 return Html.escapeHtml(bluetoothDevice.getName()); in getHtmlEscapedDeviceName()
/packages/apps/Settings/src/com/android/settings/notification/
DMediaVolumePreferenceController.java153 final CachedBluetoothDevice bluetoothDevice = in getSliceEndItem() local
155 if (bluetoothDevice == null) { in getSliceEndItem()
164 BluetoothBroadcastDialog.KEY_DEVICE_ADDRESS, bluetoothDevice.getAddress()); in getSliceEndItem()
/packages/apps/Settings/src/com/android/settings/panel/
DVolumePanel.java179 final BluetoothDevice bluetoothDevice = findActiveDevice(); in getExtraControlUri() local
180 if (bluetoothDevice != null) { in getExtraControlUri()
181 final String uri = BluetoothUtils.getControlUriMetaData(bluetoothDevice); in getExtraControlUri()

12