/packages/modules/Bluetooth/system/bta/has/ |
D | has_client.cc | 168 auto device = std::find_if(devices_.begin(), devices_.end(), in Connect() local 170 if (device == devices_.end()) { in Connect() 175 device->is_connecting_actively = true; in Connect() 176 if (!device->IsConnected()) in Connect() 191 auto device = std::find_if(devices_.begin(), devices_.end(), in AddFromStorage() local 193 if (device == devices_.end()) in AddFromStorage() 220 auto device = std::find_if(devices_.begin(), devices_.end(), in Disconnect() local 222 if (device == devices_.end()) { in Disconnect() 228 auto conn_id = device->conn_id; in Disconnect() 229 auto is_connecting_actively = device->is_connecting_actively; in Disconnect() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/ |
D | ActiveDeviceManager.java | 172 final BluetoothDevice device = intent.getParcelableExtra( 184 mHandler.post(() -> handleA2dpConnected(device)); 186 mHandler.post(() -> handleA2dpDisconnected(device)); 191 mHandler.post(() -> handleHfpConnected(device)); 193 mHandler.post(() -> handleHfpDisconnected(device)); 198 mHandler.post(() -> handleHearingAidConnected(device)); 200 mHandler.post(() -> handleHearingAidDisconnected(device)); 205 mHandler.post(() -> handleLeAudioConnected(device)); 207 mHandler.post(() -> handleLeAudioDisconnected(device)); 212 mHandler.post(() -> handleHapConnected(device)); [all …]
|
D | PhonePolicy.java | 208 BluetoothDevice device = in handleMessage() local 212 processProfileStateChanged(device, msg.arg1, nextState, prevState); in handleMessage() 227 BluetoothDevice device = (BluetoothDevice) msg.obj; in handleMessage() local 228 processConnectOtherProfiles(device); in handleMessage() 229 mConnectOtherProfilesDeviceSet.remove(device); in handleMessage() 239 BluetoothDevice device = in handleMessage() local 241 processDeviceConnected(device); in handleMessage() 283 private void processInitProfilePriorities(BluetoothDevice device, ParcelUuid[] uuids) { in processInitProfilePriorities() argument 284 debugLog("processInitProfilePriorities() - device " + device); in processInitProfilePriorities() 301 && (leAudioService.getConnectionPolicy(device) in processInitProfilePriorities() [all …]
|
D | SilenceDeviceManager.java | 129 BluetoothDevice device = (BluetoothDevice) msg.obj; in handleMessage() local 131 handleSilenceDeviceStateChanged(device, state); in handleMessage() 137 BluetoothDevice device = in handleMessage() local 144 addConnectedDevice(device, BluetoothProfile.A2DP); in handleMessage() 145 if (!mSilenceDevices.containsKey(device)) { in handleMessage() 146 mSilenceDevices.put(device, false); in handleMessage() 150 removeConnectedDevice(device, BluetoothProfile.A2DP); in handleMessage() 151 if (!isBluetoothAudioConnected(device)) { in handleMessage() 152 handleSilenceDeviceStateChanged(device, false); in handleMessage() 153 mSilenceDevices.remove(device); in handleMessage() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/a2dp/ |
D | A2dpService.java | 280 public boolean connect(BluetoothDevice device) { in connect() argument 282 Log.d(TAG, "connect(): " + device); in connect() 285 if (getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) { in connect() 286 Log.e(TAG, "Cannot connect to " + device + " : CONNECTION_POLICY_FORBIDDEN"); in connect() 289 if (!Utils.arrayContains(mAdapterService.getRemoteUuids(device), in connect() 291 Log.e(TAG, "Cannot connect to " + device + " : Remote does not have A2DP Sink UUID"); in connect() 296 if (!connectionAllowedCheckMaxDevices(device)) { in connect() 304 if (sink.equals(device)) { in connect() 305 Log.w(TAG, "Connecting to device " + device + " : disconnect skipped"); in connect() 311 Log.e(TAG, "Cannot connect to " + device + " : too many connected devices"); in connect() [all …]
|
/packages/modules/Bluetooth/system/bta/vc/ |
D | vc.cc | 102 auto device = volume_control_devices_.FindByAddress(address); in Connect() local 103 if (!device) { in Connect() 106 device->connecting_actively = true; in Connect() 108 if (device->IsConnected()) { in Connect() 110 << ", connection_id=" << device->connection_id in Connect() 113 if (device->IsReady()) { in Connect() 115 device->address); in Connect() 117 OnGattConnected(GATT_SUCCESS, device->connection_id, gatt_if_, in Connect() 118 device->address, BT_TRANSPORT_LE, GATT_MAX_MTU_SIZE); in Connect() 145 VolumeControlDevice* device = in OnGattConnected() local [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hid/ |
D | HidHostService.java | 132 for (BluetoothDevice device : mInputDevices.keySet()) { in cleanup() 133 int inputDeviceState = getConnectionState(device); in cleanup() 135 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED); in cleanup() 144 private byte[] getByteAddress(BluetoothDevice device) { in getByteAddress() argument 145 if (Utils.arrayContains(device.getUuids(), BluetoothUuid.HOGP)) { in getByteAddress() 148 return Utils.getByteAddress(device); in getByteAddress() 151 return mAdapterService.getByteIdentityAddress(device); in getByteAddress() 182 BluetoothDevice device = (BluetoothDevice) msg.obj; 183 if (!connectHidNative(getByteAddress(device))) { 184 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTING); [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfpclient/ |
D | HeadsetClientService.java | 294 public void connect(BluetoothDevice device, AttributionSource source, in connect() argument 300 defaultValue = service.connect(device); in connect() 309 public void disconnect(BluetoothDevice device, AttributionSource source, in disconnect() argument 315 defaultValue = service.disconnect(device); in disconnect() 354 public void getConnectionState(BluetoothDevice device, AttributionSource source, in getConnectionState() argument 360 defaultValue = service.getConnectionState(device); in getConnectionState() 369 public void setConnectionPolicy(BluetoothDevice device, int connectionPolicy, in setConnectionPolicy() argument 375 defaultValue = service.setConnectionPolicy(device, connectionPolicy); in setConnectionPolicy() 384 public void getConnectionPolicy(BluetoothDevice device, AttributionSource source, in getConnectionPolicy() argument 390 defaultValue = service.getConnectionPolicy(device); in getConnectionPolicy() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/bluetooth/ |
D | BluetoothConnectionRetryManagerTest.java | 123 private void sendBondStateChanged(BluetoothDevice device, int newState) { in sendBondStateChanged() argument 126 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendBondStateChanged() 131 private void sendConnectionStateChanged(BluetoothDevice device, int newState) { in sendConnectionStateChanged() argument 134 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendConnectionStateChanged() 139 private void sendSuccessfulConnection(BluetoothDevice device) { in sendSuccessfulConnection() argument 142 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendSuccessfulConnection() 148 private void sendFailedConnectionMethod1(BluetoothDevice device) { in sendFailedConnectionMethod1() argument 151 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendFailedConnectionMethod1() 157 private void sendFailedConnectionMethod2(BluetoothDevice device) { in sendFailedConnectionMethod2() argument 160 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendFailedConnectionMethod2() [all …]
|
D | BluetoothDeviceManagerTest.java | 194 BluetoothDevice device = createDevice(address, mUuids); in makeDeviceList() local 195 if (device == null) continue; in makeDeviceList() 196 devices.add(device); in makeDeviceList() 233 for (BluetoothDevice device : mDeviceList) { in setPreconditionsAndStart() 234 mDeviceManager.addDevice(device); in setPreconditionsAndStart() 245 private void sendBondStateChanged(BluetoothDevice device, int newState) { in sendBondStateChanged() argument 248 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendBondStateChanged() 253 private void sendConnectionStateChanged(String profile, BluetoothDevice device, int newState) { in sendConnectionStateChanged() argument 256 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendConnectionStateChanged() 275 BluetoothDevice device = devices.get(i); in assertDeviceList() local [all …]
|
/packages/services/Mtp/src/com/android/mtp/ |
D | MtpManager.java | 95 final MtpDevice device = new MtpDevice(rawDevice); in openDevice() local 101 if (!device.open(connection)) { in openDevice() 108 device.getStorageIds(), in openDevice() 111 mDevices.put(deviceId, device); in openDevice() 125 for (UsbDevice device : mManager.getDeviceList().values()) { in getDevices() 126 if (!isMtpDevice(device)) { in getDevices() 129 devices.add(createDeviceRecord(device)); in getDevices() 135 final MtpDevice device = getDevice(deviceId); in getObjectInfo() local 136 synchronized (device) { in getObjectInfo() 138 device.getObjectInfo(objectHandle), in getObjectInfo() [all …]
|
/packages/modules/Bluetooth/framework/tests/stress/src/android/bluetooth/ |
D | BluetoothStressTest.java | 147 BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress); in testPair() local 149 mTestUtils.unpair(mAdapter, device); in testPair() 153 mTestUtils.pair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey, in testPair() 155 mTestUtils.unpair(mAdapter, device); in testPair() 170 BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress); in testAcceptPair() local 172 mTestUtils.unpair(mAdapter, device); in testAcceptPair() 176 mTestUtils.acceptPair(mAdapter, device, BluetoothTestRunner.sDevicePairPasskey, in testAcceptPair() 178 mTestUtils.unpair(mAdapter, device); in testAcceptPair() 194 BluetoothDevice device = mAdapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress); in testConnectA2dp() local 196 mTestUtils.unpair(mAdapter, device); in testConnectA2dp() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hap/ |
D | HapClientService.java | 253 void bondStateChanged(BluetoothDevice device, int bondState) { in bondStateChanged() argument 255 Log.d(TAG, "Bond state changed for device: " + device + " state: " + bondState); in bondStateChanged() 263 mDeviceCurrentPresetMap.remove(device); in bondStateChanged() 264 mDeviceFeaturesMap.remove(device); in bondStateChanged() 265 mPresetsMap.remove(device); in bondStateChanged() 268 HapClientStateMachine sm = mStateMachines.get(device); in bondStateChanged() 274 disconnect(device); in bondStateChanged() 277 removeStateMachine(device); in bondStateChanged() 281 private void removeStateMachine(BluetoothDevice device) { in removeStateMachine() argument 283 HapClientStateMachine sm = mStateMachines.get(device); in removeStateMachine() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/tbs/ |
D | TbsGatt.java | 199 public abstract void onCallControlPointRequest(BluetoothDevice device, int opcode, in onCallControlPointRequest() argument 208 public abstract boolean isInbandRingtoneEnabled(BluetoothDevice device); in isInbandRingtoneEnabled() argument 377 private void removeUuidFromMetadata(ParcelUuid charUuid, BluetoothDevice device) { in removeUuidFromMetadata() argument 379 byte[] gtbs_cccd = device.getMetadata(METADATA_GTBS_CCCD); in removeUuidFromMetadata() 395 if (!device.setMetadata(METADATA_GTBS_CCCD, in removeUuidFromMetadata() 401 private void addUuidToMetadata(ParcelUuid charUuid, BluetoothDevice device) { in addUuidToMetadata() argument 403 byte[] gtbs_cccd = device.getMetadata(METADATA_GTBS_CCCD); in addUuidToMetadata() 418 if (!device.setMetadata(METADATA_GTBS_CCCD, in addUuidToMetadata() 425 void setCcc(BluetoothDevice device, UUID charUuid, byte[] value) { in setCcc() argument 426 HashMap<UUID, Short> characteristicCcc = mCccDescriptorValues.get(device); in setCcc() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hearingaid/ |
D | HearingAidService.java | 270 public boolean connect(BluetoothDevice device) { in connect() argument 274 Log.d(TAG, "connect(): " + device); in connect() 276 if (device == null) { in connect() 280 if (getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) { in connect() 283 ParcelUuid[] featureUuids = mAdapterService.getRemoteUuids(device); in connect() 285 Log.e(TAG, "Cannot connect to " + device + " : Remote does not have Hearing Aid UUID"); in connect() 289 long hiSyncId = mDeviceHiSyncIdMap.getOrDefault(device, in connect() 301 HearingAidStateMachine smConnect = getOrCreateStateMachine(device); in connect() 303 Log.e(TAG, "Cannot connect to " + device + " : no state machine"); in connect() 309 if (device.equals(storedDevice)) { in connect() [all …]
|
/packages/modules/adb/ |
D | test_device.py | 44 was_root = self.device.shell(['id', '-un'])[0].strip() == 'root' 46 self.device.unroot() 47 self.device.wait() 53 self.device.root() 54 self.device.wait() 60 device = adb.get_device() variable in DeviceTest 103 self._test_no_rebind('forward', self.device.forward_list, 104 self.device.forward, self.device.forward_no_rebind, 105 self.device.forward_remove_all) 108 self._test_no_rebind('reverse', self.device.reverse_list, [all …]
|
D | benchmark_device.py | 26 def lock_min(device): argument 27 device.shell_nocheck([""" 34 def lock_max(device): argument 35 device.shell_nocheck([""" 42 def unlock(device): argument 43 device.shell_nocheck([""" 61 def benchmark_sink(device=None, size_mb=100): argument 62 if device == None: 63 device = adb.get_device() 66 cmd = device.adb_cmd + ["raw", "sink:%d" % (size_mb * 1024 * 1024)] [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcpcontroller/ |
D | AvrcpCoverArtManager.java | 83 void onImageDownloadComplete(BluetoothDevice device, DownloadEvent event); in onImageDownloadComplete() argument 97 AvrcpBipSession(BluetoothDevice device) { in AvrcpBipSession() argument 98 mDevice = device; in AvrcpBipSession() 158 public synchronized boolean connect(BluetoothDevice device, int psm) { in connect() argument 159 debug("Connect " + device + ", psm: " + psm); in connect() 160 if (mClients.containsKey(device)) return false; in connect() 161 AvrcpBipClient client = new AvrcpBipClient(device, psm, new BipClientCallback(device)); in connect() 162 mClients.put(device, client); in connect() 163 mBipSessions.put(device, new AvrcpBipSession(device)); in connect() 173 public synchronized boolean refreshSession(BluetoothDevice device) { in refreshSession() argument [all …]
|
/packages/modules/Bluetooth/system/bta/csis/ |
D | csis_client.cc | 159 auto device = FindDeviceByAddress(address); in AssignCsisGroup() local 160 if (device == nullptr) { in AssignCsisGroup() 163 device = FindDeviceByAddress(address); in AssignCsisGroup() 166 if (!csis_group->IsDeviceInTheGroup(device)) csis_group->AddDevice(device); in AssignCsisGroup() 195 auto device = FindDeviceByAddress(address); in OnGroupMemberRemovedCb() local 196 if (device) RemoveCsisDevice(device, group_id); in OnGroupMemberRemovedCb() 201 auto device = FindDeviceByAddress(address); in OnGroupAddFromStorageCb() local 202 if (device == nullptr) return; in OnGroupAddFromStorageCb() 211 if (!csis_group->IsDeviceInTheGroup(device)) { in OnGroupAddFromStorageCb() 222 auto csis_instance = device->GetCsisInstanceByGroupId(group_id); in OnGroupAddFromStorageCb() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/vc/ |
D | VolumeControlService.java | 362 public boolean connect(BluetoothDevice device) { in connect() argument 366 Log.d(TAG, "connect(): " + device); in connect() 368 if (device == null) { in connect() 372 if (getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) { in connect() 375 ParcelUuid[] featureUuids = mAdapterService.getRemoteUuids(device); in connect() 377 Log.e(TAG, "Cannot connect to " + device in connect() 384 VolumeControlStateMachine smConnect = getOrCreateStateMachine(device); in connect() 386 Log.e(TAG, "Cannot connect to " + device + " : no state machine"); in connect() 395 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 399 Log.d(TAG, "disconnect(): " + device); in disconnect() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcp/ |
D | AvrcpVolumeManager.java | 80 private void switchVolumeDevice(@NonNull BluetoothDevice device) { in switchVolumeDevice() argument 82 d("switchVolumeDevice: Set Absolute volume support to " + mDeviceMap.get(device)); in switchVolumeDevice() 85 device.getAddress()), in switchVolumeDevice() 86 mDeviceMap.get(device) ? AudioManager.DEVICE_VOLUME_BEHAVIOR_ABSOLUTE in switchVolumeDevice() 90 int savedVolume = getVolume(device, sNewDeviceVolume); in switchVolumeDevice() 95 if (mDeviceMap.get(device)) { in switchVolumeDevice() 99 mNativeInterface.sendVolumeChanged(device.getAddress(), avrcpVolume); in switchVolumeDevice() 133 synchronized void storeVolumeForDevice(@NonNull BluetoothDevice device, int storeVolume) { in storeVolumeForDevice() argument 134 if (device.getBondState() != BluetoothDevice.BOND_BONDED) { in storeVolumeForDevice() 139 + device + " : " + storeVolume); in storeVolumeForDevice() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/ |
D | BluetoothDevicesService.java | 69 for (BluetoothDevice device : getDevices()) { in addListener() 70 if (device.isConnected()) { in addListener() 71 listener.onDeviceUpdated(device); in addListener() 83 public void connectDevice(BluetoothDevice device) { in connectDevice() argument 84 BluetoothDevicesService.this.connectDevice(device); in connectDevice() 88 public void disconnectDevice(BluetoothDevice device) { in disconnectDevice() argument 89 BluetoothDevicesService.this.disconnectDevice(device); in disconnectDevice() 93 public void forgetDevice(BluetoothDevice device) { in forgetDevice() argument 94 BluetoothDevicesService.this.forgetDevice(device); in forgetDevice() 98 public void renameDevice(BluetoothDevice device, String newName) { in renameDevice() argument [all …]
|
/packages/services/Car/service/src/com/android/car/bluetooth/ |
D | BluetoothConnectionRetryManager.java | 83 BluetoothDevice device = null; in onReceive() local 86 device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); in onReceive() 90 mFirstConnectionTracker.handleDeviceBondStateChange(device, bondState); in onReceive() 92 device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); in onReceive() 99 mFirstConnectionTracker.handleProfileConnectionStateChange(device, profile, in onReceive() 158 void handleDeviceBondStateChange(BluetoothDevice device, int state) { in handleDeviceBondStateChange() argument 160 Slogf.d(TAG, "Bond state has changed [device: %s, state: %s]", device, in handleDeviceBondStateChange() 163 if ((state == BluetoothDevice.BOND_BONDED) && !isDeviceBeingTracked(device)) { in handleDeviceBondStateChange() 165 trackDevice(device); in handleDeviceBondStateChange() 166 } else if ((state == BluetoothDevice.BOND_NONE) && isDeviceBeingTracked(device)) { in handleDeviceBondStateChange() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/hfp/ |
D | HeadsetStateMachine.java | 183 private HeadsetStateMachine(BluetoothDevice device, Looper looper, in HeadsetStateMachine() argument 189 mDevice = Objects.requireNonNull(device, "device cannot be null"); in HeadsetStateMachine() 202 mDatabaseManager.getAudioPolicyMetadata(device); in HeadsetStateMachine() 206 mDatabaseManager.setAudioPolicyMetadata(device, mHsClientAudioPolicy); in HeadsetStateMachine() 225 static HeadsetStateMachine make(BluetoothDevice device, Looper looper, in make() argument 229 new HeadsetStateMachine(device, looper, headsetService, adapterService, in make() 232 Log.i(TAG, "Created state machine " + stateMachine + " for " + device); in make() 331 void broadcastConnectionState(BluetoothDevice device, int fromState, int toState) { in broadcastConnectionState() argument 332 stateLogD("broadcastConnectionState " + device + ": " + fromState + "->" + toState); in broadcastConnectionState() 333 mHeadsetService.onConnectionStateChangedFromStateMachine(device, fromState, toState); in broadcastConnectionState() [all …]
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/bas/ |
D | BatteryService.java | 195 public boolean connect(BluetoothDevice device) { in connect() argument 199 Log.d(TAG, "connect(): " + device); in connect() 201 if (device == null) { in connect() 206 if (getConnectionPolicy(device) == BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) { in connect() 207 Log.w(TAG, "Cannot connect to " + device + " : policy forbidden"); in connect() 210 ParcelUuid[] featureUuids = mAdapterService.getRemoteUuids(device); in connect() 212 Log.e(TAG, "Cannot connect to " + device in connect() 218 BatteryStateMachine sm = getOrCreateStateMachine(device); in connect() 220 Log.e(TAG, "Cannot connect to " + device + " : no state machine"); in connect() 233 public boolean connectIfPossible(BluetoothDevice device) { in connectIfPossible() argument [all …]
|