Home
last modified time | relevance | path

Searched refs:device (Results 1 – 25 of 138) sorted by relevance

123456

/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
DHeadsetStateMachine.java341 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local
342 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage()
345 if (!connectHfpNative(getByteAddress(device)) ) { in processMessage()
346 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage()
352 mTargetDevice = device; in processMessage()
358 m.obj = device; in processMessage()
378 processConnectionEvent(event.valueInt, event.device); in processMessage()
397 private void processConnectionEvent(int state, BluetoothDevice device) { in processConnectionEvent() argument
399 ", device = " + device); in processConnectionEvent()
402 Log.w(TAG, "Ignore HF DISCONNECTED event, device: " + device); in processConnectionEvent()
[all …]
DHeadsetService.java143 public boolean connect(BluetoothDevice device) { in connect() argument
146 return service.connect(device); in connect()
149 public boolean disconnect(BluetoothDevice device) { in disconnect() argument
153 return service.disconnect(device); in disconnect()
168 public int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
171 return service.getConnectionState(device); in getConnectionState()
174 public boolean setPriority(BluetoothDevice device, int priority) { in setPriority() argument
177 return service.setPriority(device, priority); in setPriority()
180 public int getPriority(BluetoothDevice device) { in getPriority() argument
183 return service.getPriority(device); in getPriority()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hid/
DHidService.java152 BluetoothDevice device = (BluetoothDevice) msg.obj;
153 if (!connectHidNative(Utils.getByteAddress(device)) ) {
154 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTING);
155 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED);
158 mTargetDevice = device;
163 BluetoothDevice device = (BluetoothDevice) msg.obj;
164 if (!disconnectHidNative(Utils.getByteAddress(device)) ) {
165 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTING);
166 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED);
173 BluetoothDevice device = getDevice((byte[]) msg.obj);
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hfpclient/
DHeadsetClientService.java148 public boolean connect(BluetoothDevice device) { in connect() argument
153 return service.connect(device); in connect()
157 public boolean disconnect(BluetoothDevice device) { in disconnect() argument
162 return service.disconnect(device); in disconnect()
184 public int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
189 return service.getConnectionState(device); in getConnectionState()
193 public boolean setPriority(BluetoothDevice device, int priority) { in setPriority() argument
198 return service.setPriority(device, priority); in setPriority()
202 public int getPriority(BluetoothDevice device) { in getPriority() argument
207 return service.getPriority(device); in getPriority()
[all …]
DHeadsetClientStateMachine.java1340 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local
1342 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage()
1345 if (!connectNative(getByteAddress(device))) { in processMessage()
1346 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage()
1351 mCurrentDevice = device; in processMessage()
1364 Log.d(TAG, "Disconnected: Connection " + event.device in processMessage()
1366 processConnectionEvent(event.valueInt, event.device); in processMessage()
1380 private void processConnectionEvent(int state, BluetoothDevice device) in processConnectionEvent() argument
1385 if (okToConnect(device)) { in processConnectionEvent()
1387 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processConnectionEvent()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/
DA2dpSinkStateMachine.java183 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local
184 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage()
187 if (!connectA2dpNative(getByteAddress(device)) ) { in processMessage()
188 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage()
194 mTargetDevice = device; in processMessage()
208 processConnectionEvent(event.valueInt, event.device); in processMessage()
211 processAudioConfigEvent(event.audioConfig, event.device); in processMessage()
230 private void processConnectionEvent(int state, BluetoothDevice device) { in processConnectionEvent() argument
233 logw("Ignore HF DISCONNECTED event, device: " + device); in processConnectionEvent()
236 if (okToConnect(device)){ in processConnectionEvent()
[all …]
DA2dpStateMachine.java171 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local
172 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage()
175 if (!connectA2dpNative(getByteAddress(device)) ) { in processMessage()
176 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage()
182 mTargetDevice = device; in processMessage()
196 processConnectionEvent(event.valueInt, event.device); in processMessage()
215 private void processConnectionEvent(int state, BluetoothDevice device) { in processConnectionEvent() argument
218 logw("Ignore HF DISCONNECTED event, device: " + device); in processConnectionEvent()
221 if (okToConnect(device)){ in processConnectionEvent()
223 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processConnectionEvent()
[all …]
DA2dpService.java119 public boolean connect(BluetoothDevice device) { in connect() argument
123 if (getPriority(device) == BluetoothProfile.PRIORITY_OFF) { in connect()
127 int connectionState = mStateMachine.getConnectionState(device); in connect()
133 mStateMachine.sendMessage(A2dpStateMachine.CONNECT, device); in connect()
137 boolean disconnect(BluetoothDevice device) { in disconnect() argument
140 int connectionState = mStateMachine.getConnectionState(device); in disconnect()
146 mStateMachine.sendMessage(A2dpStateMachine.DISCONNECT, device); in disconnect()
160 int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
162 return mStateMachine.getConnectionState(device); in getConnectionState()
165 public boolean setPriority(BluetoothDevice device, int priority) { in setPriority() argument
[all …]
DA2dpSinkService.java104 public boolean connect(BluetoothDevice device) { in connect() argument
108 int connectionState = mStateMachine.getConnectionState(device); in connect()
114 mStateMachine.sendMessage(A2dpSinkStateMachine.CONNECT, device); in connect()
118 boolean disconnect(BluetoothDevice device) { in disconnect() argument
121 int connectionState = mStateMachine.getConnectionState(device); in disconnect()
127 mStateMachine.sendMessage(A2dpSinkStateMachine.DISCONNECT, device); in disconnect()
141 int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
143 return mStateMachine.getConnectionState(device); in getConnectionState()
146 BluetoothAudioConfig getAudioConfig(BluetoothDevice device) { in getAudioConfig() argument
148 return mStateMachine.getAudioConfig(device); in getAudioConfig()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
DAdapterService.java192 …public void onProfileConnectionStateChanged(BluetoothDevice device, int profileId, int newState, i… in onProfileConnectionStateChanged() argument
194 m.obj = device; in onProfileConnectionStateChanged()
203 public void initProfilePriorities(BluetoothDevice device, ParcelUuid[] mUuids) { in initProfilePriorities() argument
206 m.obj = device; in initProfilePriorities()
216 private void processInitProfilePriorities (BluetoothDevice device, ParcelUuid[] uuids){ in processInitProfilePriorities() argument
226 (hidService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){ in processInitProfilePriorities()
227 hidService.setPriority(device,BluetoothProfile.PRIORITY_ON); in processInitProfilePriorities()
234 (a2dpService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){ in processInitProfilePriorities()
235 a2dpService.setPriority(device,BluetoothProfile.PRIORITY_ON); in processInitProfilePriorities()
241 (headsetService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED))){ in processInitProfilePriorities()
[all …]
DRemoteDevices.java85 DeviceProperties getDeviceProperties(BluetoothDevice device) { in getDeviceProperties() argument
87 return mDevices.get(device); in getDeviceProperties()
103 BluetoothDevice device = in addDeviceProperties() local
106 mDevices.put(device, prop); in addDeviceProperties()
226 private void sendUuidIntent(BluetoothDevice device) { in sendUuidIntent() argument
227 DeviceProperties prop = getDeviceProperties(device); in sendUuidIntent()
229 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendUuidIntent()
231 mAdapterService.initProfilePriorities(device, prop.mUuids); in sendUuidIntent()
235 mSdpTracker.remove(device); in sendUuidIntent()
239 private void sendMasInstanceIntent(BluetoothDevice device, in sendMasInstanceIntent() argument
[all …]
DBondStateMachine.java305 private void sendIntent(BluetoothDevice device, int newState, int reason) { in sendIntent() argument
306 DeviceProperties devProp = mRemoteDevices.getDeviceProperties(device); in sendIntent()
312 mAdapterProperties.onBondStateChanged(device, newState); in sendIntent()
315 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendIntent()
322 infoLog("Bond State Change Intent:" + device + " OldState: " + oldState in sendIntent()
327 BluetoothDevice device = mRemoteDevices.getDevice(address); in bondStateChangeCallback() local
329 if (device == null) { in bondStateChangeCallback()
330 infoLog("No record of the device:" + device); in bondStateChangeCallback()
333 device = mAdapter.getRemoteDevice(Utils.getAddressStringFromByte(address)); in bondStateChangeCallback()
336 infoLog("bondStateChangeCallback: Status: " + status + " Address: " + device in bondStateChangeCallback()
[all …]
/packages/apps/Settings/src/com/android/settings/bluetooth/
DDockService.java261 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 …]
DBluetoothEventManager.java56 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 …]
DMapProfile.java69 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 …]
DHeadsetProfile.java69 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
129 if (dev.equals(device)) { in disconnect()
133 if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) { in disconnect()
[all …]
DA2dpProfile.java66 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 …]
DHidProfile.java61 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 …]
DPanProfile.java85 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 …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hdp/
DHealthService.java265 BluetoothDevice device = getDevice(channelStateEvent.mAddr); in handleMessage() local
266 chan = new HealthChannel(device, appConfig, appConfig.getChannelType()); in handleMessage()
356 public boolean connectChannelToSource(BluetoothDevice device, in connectChannelToSource() argument
360 return service.connectChannelToSource(device, config); in connectChannelToSource()
363 public boolean connectChannelToSink(BluetoothDevice device, in connectChannelToSink() argument
367 return service.connectChannelToSink(device, config, channelType); in connectChannelToSink()
370 public boolean disconnectChannel(BluetoothDevice device, in disconnectChannel() argument
374 return service.disconnectChannel(device, config, channelId); in disconnectChannel()
377 public ParcelFileDescriptor getMainChannelFd(BluetoothDevice device, in getMainChannelFd() argument
381 return service.getMainChannelFd(device, config); in getMainChannelFd()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/bluetooth/
DBluetoothScanner.java127 public void onDeviceAdded(Device device) { in onDeviceAdded() argument
129 public void onDeviceChanged(Device device) { in onDeviceChanged() argument
131 public void onDeviceRemoved(Device device) { in onDeviceRemoved() argument
179 public static void removeDevice(Device device) { in removeDevice() argument
180 removeDevice(device.address); in removeDevice()
408 Device device = null; in onReceive() local
413 device = d; in onReceive()
418 if (device == null) { in onReceive()
423 device = new Device(); in onReceive()
424 device.btDevice = btDevice; in onReceive()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/pan/
DPanService.java140 BluetoothDevice device = (BluetoothDevice) msg.obj;
141 if (!connectPanNative(Utils.getByteAddress(device),
143 handlePanDeviceStateChange(device, null, BluetoothProfile.STATE_CONNECTING,
145 handlePanDeviceStateChange(device, null,
154 BluetoothDevice device = (BluetoothDevice) msg.obj;
155 if (!disconnectPanNative(Utils.getByteAddress(device)) ) {
156 handlePanDeviceStateChange(device, mPanIfName,
159 handlePanDeviceStateChange(device, mPanIfName,
169 BluetoothDevice device = getDevice(cs.addr);
172 log("MESSAGE_CONNECT_STATE_CHANGED: " + device + " state: " + cs.state);
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/
DInputPairer.java137 public void onDeviceAdded(BluetoothScanner.Device device) {
139 Log.d(TAG, "Adding device: " + device.btDevice.getAddress());
141 onDeviceFound(device.btDevice);
145 public void onDeviceRemoved(BluetoothScanner.Device device) {
147 Log.d(TAG, "Device lost: " + device.btDevice.getAddress());
149 onDeviceLost(device.btDevice);
157 InputDevice device = inMan.getInputDevice(deviceIds[ptr]); in hasValidInputDevice() local
158 int sources = device.getSources(); in hasValidInputDevice()
172 String keyboardName = device.getName(); in hasValidInputDevice()
185 if (!device.isVirtual() && isCompatible) { in hasValidInputDevice()
[all …]
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DMtpClient.java132 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/avrcp/
DAvrcpControllerService.java150 int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
152 return (mConnectedDevices.contains(device) ? BluetoothProfile.STATE_CONNECTED in getConnectionState()
156 public void sendPassThroughCmd(BluetoothDevice device, int keyCode, int keyState) { in sendPassThroughCmd() argument
159 if (device == null) { in sendPassThroughCmd()
164 keyCode, keyState, device); in sendPassThroughCmd()
206 public int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
209 return service.getConnectionState(device); in getConnectionState()
212 public void sendPassThroughCmd(BluetoothDevice device, int keyCode, int keyState) { in sendPassThroughCmd() argument
216 service.sendPassThroughCmd(device, keyCode, keyState); in sendPassThroughCmd()
231 BluetoothDevice device = (BluetoothDevice)msg.obj; in handleMessage() local
[all …]

123456