/packages/apps/Bluetooth/src/com/android/bluetooth/hid/ |
D | HidService.java | 151 BluetoothDevice device = (BluetoothDevice) msg.obj; 152 if (!connectHidNative(Utils.getByteAddress(device)) ) { 153 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTING); 154 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED); 157 mTargetDevice = device; 162 BluetoothDevice device = (BluetoothDevice) msg.obj; 163 if (!disconnectHidNative(Utils.getByteAddress(device)) ) { 164 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTING); 165 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED); 172 BluetoothDevice device = getDevice((byte[]) msg.obj); [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/ |
D | A2dpStateMachine.java | 176 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local 177 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage() 180 if (!connectA2dpNative(getByteAddress(device)) ) { in processMessage() 181 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage() 187 mTargetDevice = device; in processMessage() 201 processConnectionEvent(event.valueInt, event.device); in processMessage() 220 private void processConnectionEvent(int state, BluetoothDevice device) { in processConnectionEvent() argument 223 logw("Ignore HF DISCONNECTED event, device: " + device); in processConnectionEvent() 226 if (okToConnect(device)){ in processConnectionEvent() 228 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processConnectionEvent() [all …]
|
D | A2dpService.java | 114 public boolean connect(BluetoothDevice device) { in connect() argument 118 if (getPriority(device) == BluetoothProfile.PRIORITY_OFF) { in connect() 122 int connectionState = mStateMachine.getConnectionState(device); in connect() 128 mStateMachine.sendMessage(A2dpStateMachine.CONNECT, device); in connect() 132 boolean disconnect(BluetoothDevice device) { in disconnect() argument 135 int connectionState = mStateMachine.getConnectionState(device); in disconnect() 141 mStateMachine.sendMessage(A2dpStateMachine.DISCONNECT, device); in disconnect() 155 int getConnectionState(BluetoothDevice device) { in getConnectionState() argument 157 return mStateMachine.getConnectionState(device); in getConnectionState() 160 public boolean setPriority(BluetoothDevice device, int priority) { in setPriority() argument [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/ |
D | AdapterService.java | 153 …public void onProfileConnectionStateChanged(BluetoothDevice device, int profileId, int newState, i… in onProfileConnectionStateChanged() argument 155 m.obj = device; in onProfileConnectionStateChanged() 164 …private void processProfileStateChanged(BluetoothDevice device, int profileId, int newState, int p… in processProfileStateChanged() argument 168 connectOtherProfile(device, PROFILE_CONN_CONNECTED); in processProfileStateChanged() 169 setProfileAutoConnectionPriority(device, profileId); in processProfileStateChanged() 174 binder.sendConnectionStateChange(device, profileId, newState,prevState); in processProfileStateChanged() 696 public boolean createBond(BluetoothDevice device) { in createBond() argument 704 return service.createBond(device); in createBond() 707 public boolean cancelBondProcess(BluetoothDevice device) { in cancelBondProcess() argument 715 return service.cancelBondProcess(device); in cancelBondProcess() [all …]
|
D | RemoteDevices.java | 73 DeviceProperties getDeviceProperties(BluetoothDevice device) { in getDeviceProperties() argument 75 return mDevices.get(device); in getDeviceProperties() 91 BluetoothDevice device = in addDeviceProperties() local 94 mDevices.put(device, prop); in addDeviceProperties() 214 private void sendUuidIntent(BluetoothDevice device) { in sendUuidIntent() argument 215 DeviceProperties prop = getDeviceProperties(device); in sendUuidIntent() 217 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendUuidIntent() 222 mSdpTracker.remove(device); in sendUuidIntent() 239 DeviceProperties device; in devicePropertyChangedCallback() local 241 device = addDeviceProperties(address); in devicePropertyChangedCallback() [all …]
|
D | BondStateMachine.java | 253 private void sendIntent(BluetoothDevice device, int newState, int reason) { in sendIntent() argument 254 DeviceProperties devProp = mRemoteDevices.getDeviceProperties(device); in sendIntent() 260 mAdapterProperties.onBondStateChanged(device, newState); in sendIntent() 263 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendIntent() 270 infoLog("Bond State Change Intent:" + device + " OldState: " + oldState in sendIntent() 275 BluetoothDevice device = mRemoteDevices.getDevice(address); in bondStateChangeCallback() local 277 if (device == null) { in bondStateChangeCallback() 278 infoLog("No record of the device:" + device); in bondStateChangeCallback() 281 device = mAdapter.getRemoteDevice(Utils.getAddressStringFromByte(address)); in bondStateChangeCallback() 284 infoLog("bondStateChangeCallback: Status: " + status + " Address: " + device in bondStateChangeCallback() [all …]
|
D | AdapterProperties.java | 232 void onBondStateChanged(BluetoothDevice device, int state) in onBondStateChanged() argument 234 if(device == null) in onBondStateChanged() 237 byte[] addrByte = Utils.getByteAddress(device); in onBondStateChanged() 238 DeviceProperties prop = mRemoteDevices.getDeviceProperties(device); in onBondStateChanged() 245 if(!mBondedDevices.contains(device)) { in onBondStateChanged() 246 debugLog("Adding bonded device:" + device); in onBondStateChanged() 247 mBondedDevices.add(device); in onBondStateChanged() 251 if (mBondedDevices.remove(device)) in onBondStateChanged() 252 debugLog("Removing bonded device:" + device); in onBondStateChanged() 254 debugLog("Failed to remove device: " + device); in onBondStateChanged() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/ |
D | HeadsetService.java | 143 public boolean connect(BluetoothDevice device) { in connect() argument 146 return service.connect(device); in connect() 149 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 152 return service.disconnect(device); in disconnect() 167 public int getConnectionState(BluetoothDevice device) { in getConnectionState() argument 170 return service.getConnectionState(device); in getConnectionState() 173 public boolean setPriority(BluetoothDevice device, int priority) { in setPriority() argument 176 return service.setPriority(device, priority); in setPriority() 179 public int getPriority(BluetoothDevice device) { in getPriority() argument 182 return service.getPriority(device); in getPriority() [all …]
|
D | HeadsetStateMachine.java | 274 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local 275 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage() 278 if (!connectHfpNative(getByteAddress(device)) ) { in processMessage() 279 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage() 285 mTargetDevice = device; in processMessage() 309 processConnectionEvent(event.valueInt, event.device); in processMessage() 328 private void processConnectionEvent(int state, BluetoothDevice device) { in processConnectionEvent() argument 331 Log.w(TAG, "Ignore HF DISCONNECTED event, device: " + device); in processConnectionEvent() 334 if (okToConnect(device)){ in processConnectionEvent() 336 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processConnectionEvent() [all …]
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | DockService.java | 261 BluetoothDevice device = null; in processMessage() local 263 device = (BluetoothDevice) msg.obj; in processMessage() 267 + (device == null ? "null" : device.toString())); in processMessage() 273 if (device != null) { in processMessage() 274 createDialog(device, state, startId); in processMessage() 279 deferFinishCall = msgTypeDocked(device, state, startId); in processMessage() 283 deferFinishCall = msgTypeUndockedPermanent(device, startId); in processMessage() 287 msgTypeUndockedTemporary(device, state, startId); in processMessage() 322 private void msgTypeUndockedTemporary(BluetoothDevice device, int state, in msgTypeUndockedTemporary() argument 326 startId, device); in msgTypeUndockedTemporary() [all …]
|
D | BluetoothEventManager.java | 56 void onReceive(Context context, Intent intent, BluetoothDevice device); in onReceive() argument 132 BluetoothDevice device = i.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); in getDockedDeviceAddress() local 133 if (device != null) { in getDockedDeviceAddress() 134 return device.getAddress(); in getDockedDeviceAddress() 145 BluetoothDevice device = intent 150 handler.onReceive(context, intent, device); 157 BluetoothDevice device) { in onReceive() argument 180 BluetoothDevice device) { in onReceive() argument 193 BluetoothDevice device) { in onReceive() argument 199 CachedBluetoothDevice cachedDevice = mDeviceManager.findDevice(device); in onReceive() [all …]
|
D | MapProfile.java | 69 CachedBluetoothDevice device = mDeviceManager.findDevice(nextDevice); in onServiceConnected() local 71 if (device == null) { in onServiceConnected() 73 device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice); in onServiceConnected() 75 device.onProfileStateChanged(MapProfile.this, in onServiceConnected() 77 device.refresh(); in onServiceConnected() 114 public boolean connect(BluetoothDevice device) { in connect() argument 119 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 122 if (!deviceList.isEmpty() && deviceList.get(0).equals(device)) { in disconnect() 123 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) { in disconnect() 124 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect() [all …]
|
D | HeadsetProfile.java | 69 CachedBluetoothDevice device = mDeviceManager.findDevice(nextDevice); in onServiceConnected() local 71 if (device == null) { in onServiceConnected() 73 device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice); in onServiceConnected() 75 device.onProfileStateChanged(HeadsetProfile.this, in onServiceConnected() 77 device.refresh(); in onServiceConnected() 113 public boolean connect(BluetoothDevice device) { in connect() argument 121 return mService.connect(device); in connect() 124 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 127 if (!deviceList.isEmpty() && deviceList.get(0).equals(device)) { in disconnect() 129 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) { in disconnect() [all …]
|
D | A2dpProfile.java | 66 CachedBluetoothDevice device = mDeviceManager.findDevice(nextDevice); in onServiceConnected() local 68 if (device == null) { in onServiceConnected() 70 device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice); in onServiceConnected() 72 device.onProfileStateChanged(A2dpProfile.this, BluetoothProfile.STATE_CONNECTED); in onServiceConnected() 73 device.refresh(); in onServiceConnected() 114 public boolean connect(BluetoothDevice device) { in connect() argument 122 return mService.connect(device); in connect() 125 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 128 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON){ in disconnect() 129 mService.setPriority(device, BluetoothProfile.PRIORITY_ON); in disconnect() [all …]
|
D | HidProfile.java | 61 CachedBluetoothDevice device = mDeviceManager.findDevice(nextDevice); in onServiceConnected() local 63 if (device == null) { in onServiceConnected() 65 device = mDeviceManager.addDevice(mLocalAdapter, mProfileManager, nextDevice); in onServiceConnected() 67 device.onProfileStateChanged(HidProfile.this, BluetoothProfile.STATE_CONNECTED); in onServiceConnected() 68 device.refresh(); in onServiceConnected() 101 public boolean connect(BluetoothDevice device) { in connect() argument 103 return mService.connect(device); in connect() 106 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 108 return mService.disconnect(device); in disconnect() 111 public int getConnectionStatus(BluetoothDevice device) { in getConnectionStatus() argument [all …]
|
D | PanProfile.java | 85 public boolean connect(BluetoothDevice device) { in connect() argument 93 return mService.connect(device); in connect() 96 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 98 return mService.disconnect(device); in disconnect() 101 public int getConnectionStatus(BluetoothDevice device) { in getConnectionStatus() argument 105 return mService.getConnectionState(device); in getConnectionStatus() 108 public boolean isPreferred(BluetoothDevice device) { in isPreferred() argument 110 return getConnectionStatus(device) == BluetoothProfile.STATE_CONNECTED; in isPreferred() 113 public int getPreferred(BluetoothDevice device) { in getPreferred() argument 117 public void setPreferred(BluetoothDevice device, boolean preferred) { in setPreferred() argument [all …]
|
D | DeviceProfilesSettings.java | 95 BluetoothDevice device; in onCreate() local 97 device = savedInstanceState.getParcelable(EXTRA_DEVICE); in onCreate() 100 device = args.getParcelable(EXTRA_DEVICE); in onCreate() 108 if (device == null) { in onCreate() 118 mCachedDevice = deviceManager.findDevice(device); in onCreate() 254 BluetoothDevice device = mCachedDevice.getDevice(); in onProfileClicked() local 256 int status = profile.getConnectionStatus(device); in onProfileClicked() 263 if (profile.isPreferred(device)) { in onProfileClicked() 265 profile.setPreferred(device, false); in onProfileClicked() 268 profile.setPreferred(device, true); in onProfileClicked() [all …]
|
D | CachedBluetoothDeviceManager.java | 52 public void onDeviceNameUpdated(BluetoothDevice device) { in onDeviceNameUpdated() argument 53 CachedBluetoothDevice cachedDevice = findDevice(device); in onDeviceNameUpdated() 69 CachedBluetoothDevice findDevice(BluetoothDevice device) { in findDevice() argument 71 if (cachedDevice.getDevice().equals(device)) { in findDevice() 86 BluetoothDevice device) { in addDevice() argument 88 profileManager, device); in addDevice() 99 public String getName(BluetoothDevice device) { in getName() argument 100 CachedBluetoothDevice cachedDevice = findDevice(device); in getName() 105 String name = device.getAliasName(); in getName() 110 return device.getAddress(); in getName() [all …]
|
D | PbapServerProfile.java | 79 public boolean connect(BluetoothDevice device) { in connect() argument 85 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 90 public int getConnectionStatus(BluetoothDevice device) { in getConnectionStatus() argument 94 if (mService.isConnected(device)) in getConnectionStatus() 100 public boolean isPreferred(BluetoothDevice device) { in isPreferred() argument 104 public int getPreferred(BluetoothDevice device) { in getPreferred() argument 108 public void setPreferred(BluetoothDevice device, boolean preferred) { in setPreferred() argument 120 public int getNameResource(BluetoothDevice device) { in getNameResource() argument 124 public int getSummaryResourceForDevice(BluetoothDevice device) { in getSummaryResourceForDevice() argument
|
D | BluetoothDeviceFilter.java | 36 boolean matches(BluetoothDevice device); in matches() argument 79 public boolean matches(BluetoothDevice device) { in matches() argument 86 public boolean matches(BluetoothDevice device) { in matches() argument 87 return device.getBondState() == BluetoothDevice.BOND_BONDED; in matches() 93 public boolean matches(BluetoothDevice device) { in matches() argument 94 return device.getBondState() != BluetoothDevice.BOND_BONDED; in matches() 102 public boolean matches(BluetoothDevice device) { in matches() argument 103 return matches(device.getUuids(), device.getBluetoothClass()); in matches()
|
/packages/apps/Bluetooth/src/com/android/bluetooth/hdp/ |
D | HealthService.java | 262 BluetoothDevice device = getDevice(channelStateEvent.mAddr); in handleMessage() local 263 chan = new HealthChannel(device, appConfig, appConfig.getChannelType()); in handleMessage() 353 public boolean connectChannelToSource(BluetoothDevice device, in connectChannelToSource() argument 357 return service.connectChannelToSource(device, config); in connectChannelToSource() 360 public boolean connectChannelToSink(BluetoothDevice device, in connectChannelToSink() argument 364 return service.connectChannelToSink(device, config, channelType); in connectChannelToSink() 367 public boolean disconnectChannel(BluetoothDevice device, in disconnectChannel() argument 371 return service.disconnectChannel(device, config, channelId); in disconnectChannel() 374 public ParcelFileDescriptor getMainChannelFd(BluetoothDevice device, in getMainChannelFd() argument 378 return service.getMainChannelFd(device, config); in getMainChannelFd() [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/pan/ |
D | PanService.java | 148 BluetoothDevice device = (BluetoothDevice) msg.obj; 149 if (!connectPanNative(Utils.getByteAddress(device), 151 handlePanDeviceStateChange(device, null, BluetoothProfile.STATE_CONNECTING, 153 handlePanDeviceStateChange(device, null, 162 BluetoothDevice device = (BluetoothDevice) msg.obj; 163 if (!disconnectPanNative(Utils.getByteAddress(device)) ) { 164 handlePanDeviceStateChange(device, mPanIfName, 167 handlePanDeviceStateChange(device, mPanIfName, 177 BluetoothDevice device = getDevice(cs.addr); 180 log("MESSAGE_CONNECT_STATE_CHANGED: " + device + " state: " + cs.state); [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | MtpClient.java | 132 public void deviceAdded(MtpDevice device); in deviceAdded() argument 139 public void deviceRemoved(MtpDevice device); in deviceRemoved() argument 149 static public boolean isCamera(UsbDevice device) { in isCamera() argument 150 int count = device.getInterfaceCount(); in isCamera() 152 UsbInterface intf = device.getInterface(i); in isCamera() 300 MtpDevice device = getDevice(deviceName); in getStorageList() local 301 if (device == null) { in getStorageList() 304 int[] storageIds = device.getStorageIds(); in getStorageList() 312 MtpStorageInfo info = device.getStorageInfo(storageIds[i]); in getStorageList() 332 MtpDevice device = getDevice(deviceName); in getObjectInfo() local [all …]
|
/packages/apps/Bluetooth/src/com/android/bluetooth/map/ |
D | BluetoothMapService.java | 538 public boolean disconnect(BluetoothDevice device) { in disconnect() argument 539 …essionStatusHandler.sendMessage(mSessionStatusHandler.obtainMessage(DISCONNECT_MAP, 0, 0, device)); in disconnect() 543 public boolean disconnectMap(BluetoothDevice device) { in disconnectMap() argument 546 if (getRemoteDevice().equals(device)) { in disconnectMap() 584 for (BluetoothDevice device : bondedDevices) { in getDevicesMatchingConnectionStates() 585 ParcelUuid[] featureUuids = device.getUuids(); in getDevicesMatchingConnectionStates() 589 connectionState = getConnectionState(device); in getDevicesMatchingConnectionStates() 592 deviceList.add(device); in getDevicesMatchingConnectionStates() 600 public int getConnectionState(BluetoothDevice device) { in getConnectionState() argument 602 if (getState() == BluetoothMap.STATE_CONNECTED && getRemoteDevice().equals(device)) { in getConnectionState() [all …]
|
/packages/apps/Settings/src/com/android/settings/wifi/p2p/ |
D | WifiP2pPeer.java | 32 public WifiP2pDevice device; field in WifiP2pPeer 41 device = dev; in WifiP2pPeer() 48 if (TextUtils.isEmpty(device.deviceName)) { in onBindView() 49 setTitle(device.deviceAddress); in onBindView() 51 setTitle(device.deviceName); in onBindView() 72 if (device.status != other.device.status) { in compareTo() 73 return device.status < other.device.status ? -1 : 1; in compareTo() 77 if (device.deviceName != null) { in compareTo() 78 return device.deviceName.compareToIgnoreCase(other.device.deviceName); in compareTo() 81 return device.deviceAddress.compareToIgnoreCase(other.device.deviceAddress); in compareTo() [all …]
|