Home
last modified time | relevance | path

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

12345678910>>...13

/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
DHeadsetStateMachine.java349 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local
350 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage()
353 if (!connectHfpNative(getByteAddress(device))) { in processMessage()
354 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage()
360 mTargetDevice = device; in processMessage()
366 m.obj = device; in processMessage()
385 processConnectionEvent(event.valueInt, event.device); in processMessage()
404 private void processConnectionEvent(int state, BluetoothDevice device) { in processConnectionEvent() argument
405 Log.d(TAG, "processConnectionEvent state = " + state + ", device = " + device); in processConnectionEvent()
408 Log.w(TAG, "Ignore HF DISCONNECTED event, device: " + device); in processConnectionEvent()
[all …]
DHeadsetService.java141 public boolean connect(BluetoothDevice device) { in connect() argument
144 return service.connect(device); in connect()
147 public boolean disconnect(BluetoothDevice device) { in disconnect() argument
151 return service.disconnect(device); in disconnect()
166 public int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
169 return service.getConnectionState(device); in getConnectionState()
172 public boolean setPriority(BluetoothDevice device, int priority) { in setPriority() argument
175 return service.setPriority(device, priority); in setPriority()
178 public int getPriority(BluetoothDevice device) { in getPriority() argument
181 return service.getPriority(device); in getPriority()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hfpclient/
DHeadsetClientService.java212 public boolean connect(BluetoothDevice device) { in connect() argument
217 return service.connect(device); in connect()
221 public boolean disconnect(BluetoothDevice device) { in disconnect() argument
226 return service.disconnect(device); in disconnect()
248 public int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
253 return service.getConnectionState(device); in getConnectionState()
257 public boolean setPriority(BluetoothDevice device, int priority) { in setPriority() argument
262 return service.setPriority(device, priority); in setPriority()
266 public int getPriority(BluetoothDevice device) { in getPriority() argument
271 return service.getPriority(device); in getPriority()
[all …]
DHeadsetClientStateMachine.java791 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local
792 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage()
795 if (!NativeInterface.connectNative(getByteAddress(device))) { in processMessage()
796 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage()
801 mCurrentDevice = device; in processMessage()
816 Log.d(TAG, "Disconnected: Connection " + event.device in processMessage()
819 processConnectionEvent(event.valueInt, event.device); in processMessage()
833 private void processConnectionEvent(int state, BluetoothDevice device) in processConnectionEvent() argument
838 if (okToConnect(device)) { in processConnectionEvent()
840 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processConnectionEvent()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hid/
DHidService.java100 for (BluetoothDevice device : mInputDevices.keySet()) { in cleanup()
101 int inputDeviceState = getConnectionState(device); in cleanup()
103 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED); in cleanup()
154 BluetoothDevice device = (BluetoothDevice) msg.obj;
155 if (!connectHidNative(Utils.getByteAddress(device)) ) {
156 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTING);
157 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED);
160 mTargetDevice = device;
165 BluetoothDevice device = (BluetoothDevice) msg.obj;
166 if (!disconnectHidNative(Utils.getByteAddress(device)) ) {
[all …]
DHidDevService.java81 BluetoothDevice device = msg.obj != null ? getDevice((byte[]) msg.obj) : null;
85 mHidDevice = device;
92 mCallback.onAppStatusChanged(device, mAppConfig, success);
135 BluetoothDevice device = getDevice((byte[]) msg.obj);
140 mHidDevice = device;
143 broadcastConnectionState(device, state);
146 if (mCallback != null) mCallback.onConnectionStateChanged(device, state);
297 public boolean sendReport(BluetoothDevice device, int id, byte[] data) { in sendReport() argument
298 if (DBG) Log.v(TAG, "sendReport(): device=" + device + " id=" + id); in sendReport()
305 return service.sendReport(device, id, data); in sendReport()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dpsink/
DA2dpSinkStateMachine.java201 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local
202 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage()
205 if (!connectA2dpNative(getByteAddress(device)) ) { in processMessage()
206 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage()
212 mTargetDevice = device; in processMessage()
226 processConnectionEvent(event.valueInt, event.device); in processMessage()
229 processAudioConfigEvent(event.audioConfig, event.device); in processMessage()
248 private void processConnectionEvent(int state, BluetoothDevice device) { in processConnectionEvent() argument
251 logw("Ignore A2DP DISCONNECTED event, device: " + device); in processConnectionEvent()
254 if (okToConnect(device)){ in processConnectionEvent()
[all …]
DA2dpSinkService.java123 public boolean connect(BluetoothDevice device) { in connect() argument
127 int connectionState = mStateMachine.getConnectionState(device); in connect()
133 if (getPriority(device) == BluetoothProfile.PRIORITY_OFF) { in connect()
137 mStateMachine.sendMessage(A2dpSinkStateMachine.CONNECT, device); in connect()
141 boolean disconnect(BluetoothDevice device) { in disconnect() argument
144 int connectionState = mStateMachine.getConnectionState(device); in disconnect()
150 mStateMachine.sendMessage(A2dpSinkStateMachine.DISCONNECT, device); in disconnect()
164 int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
166 return mStateMachine.getConnectionState(device); in getConnectionState()
169 public boolean setPriority(BluetoothDevice device, int priority) { in setPriority() argument
[all …]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/setting/usb/
DUsbDeviceHandlerResolver.java70 UsbDevice device, List<UsbDeviceSettings> availableSettings); in onHandlersResolveCompleted() argument
154 DeviceFilter(UsbDevice device) { in DeviceFilter() argument
155 mVendorId = device.getVendorId(); in DeviceFilter()
156 mProductId = device.getProductId(); in DeviceFilter()
157 mClass = device.getDeviceClass(); in DeviceFilter()
158 mSubclass = device.getDeviceSubclass(); in DeviceFilter()
159 mProtocol = device.getDeviceProtocol(); in DeviceFilter()
160 mManufacturerName = device.getManufacturerName(); in DeviceFilter()
161 mProductName = device.getProductName(); in DeviceFilter()
162 mSerialNumber = device.getSerialNumber(); in DeviceFilter()
[all …]
DUsbDeviceStateController.java44 void onDeviceResetComplete(UsbDevice device); in onDeviceResetComplete() argument
45 void onAoapStartComplete(UsbDevice device); in onAoapStartComplete() argument
46 void onAoapStartFailed(UsbDevice device); in onAoapStartFailed() argument
117 public void startDeviceReset(UsbDevice device) { in startDeviceReset() argument
119 Log.d(TAG, "startDeviceReset: " + device); in startDeviceReset()
121 mHandler.requestDeviceReset(device); in startDeviceReset()
126 Log.d(TAG, "startAoap: " + request.device); in startAoap()
131 private void doHandleDeviceReset(UsbDevice device) { in doHandleDeviceReset() argument
133 Log.d(TAG, "doHandleDeviceReset: " + device); in doHandleDeviceReset()
139 boolean isInAoap = AoapInterface.isDeviceInAoapMode(device); in doHandleDeviceReset()
[all …]
DUsbHostController.java73 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE);
74 unsetActiveDeviceIfSerialMatch(device);
76 UsbDevice device = intent.<UsbDevice>getParcelableExtra(UsbManager.EXTRA_DEVICE);
77 setActiveDeviceIfSerialMatch(device);
103 private synchronized void setActiveDeviceIfSerialMatch(UsbDevice device) { in setActiveDeviceIfSerialMatch() argument
104 if (device != null && device.getSerialNumber() != null in setActiveDeviceIfSerialMatch()
105 && device.getSerialNumber().equals(mProcessingDeviceSerial)) { in setActiveDeviceIfSerialMatch()
106 mActiveDevice = device; in setActiveDeviceIfSerialMatch()
110 private synchronized void unsetActiveDeviceIfSerialMatch(UsbDevice device) { in unsetActiveDeviceIfSerialMatch() argument
113 && mActiveDevice.getSerialNumber().equals(device.getSerialNumber())) { in unsetActiveDeviceIfSerialMatch()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/
DA2dpStateMachine.java291 BluetoothDevice device = (BluetoothDevice) message.obj; in processMessage() local
292 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processMessage()
295 if (!connectA2dpNative(getByteAddress(device)) ) { in processMessage()
296 broadcastConnectionState(device, BluetoothProfile.STATE_DISCONNECTED, in processMessage()
302 mTargetDevice = device; in processMessage()
316 processConnectionEvent(event.valueInt, event.device); in processMessage()
335 private void processConnectionEvent(int state, BluetoothDevice device) { in processConnectionEvent() argument
338 logw("Ignore HF DISCONNECTED event, device: " + device); in processConnectionEvent()
341 if (okToConnect(device)){ in processConnectionEvent()
343 broadcastConnectionState(device, BluetoothProfile.STATE_CONNECTING, in processConnectionEvent()
[all …]
DA2dpService.java58 BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
59 if (state != BluetoothProfile.STATE_CONNECTED || device == null) {
65 int previousSupport = getSupportsOptionalCodecs(device);
77 setSupportsOptionalCodecs(device, supportsOptional);
80 int enabled = getOptionalCodecsEnabled(device);
176 public boolean connect(BluetoothDevice device) { in connect() argument
180 if (getPriority(device) == BluetoothProfile.PRIORITY_OFF) { in connect()
183 ParcelUuid[] featureUuids = device.getUuids(); in connect()
190 int connectionState = mStateMachine.getConnectionState(device); in connect()
196 mStateMachine.sendMessage(A2dpStateMachine.CONNECT, device); in connect()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/
DAvrcpControllerService.java301 public synchronized int getConnectionState(BluetoothDevice device) { in getConnectionState() argument
307 …public synchronized void sendGroupNavigationCmd(BluetoothDevice device, int keyCode, int keyState)… in sendGroupNavigationCmd() argument
309 if (device == null) { in sendGroupNavigationCmd()
313 if (!(device.equals(mConnectedDevice))) { in sendGroupNavigationCmd()
314 Log.e(TAG, " Device does not match " + device + " connected " + mConnectedDevice); in sendGroupNavigationCmd()
319 MESSAGE_SEND_GROUP_NAVIGATION_CMD, keyCode, keyState, device); in sendGroupNavigationCmd()
323 public synchronized void sendPassThroughCmd(BluetoothDevice device, int keyCode, int keyState) { in sendPassThroughCmd() argument
325 if (device == null) { in sendPassThroughCmd()
330 if (!device.equals(mConnectedDevice)) { in sendPassThroughCmd()
331 Log.w(TAG, " Device does not match device " + device + " conn " + mConnectedDevice); in sendPassThroughCmd()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
DPhonePolicy.java135 BluetoothDevice device = in handleMessage() local
141 Log.d(TAG, "UUIDs on ACTION_UUID: " + uuids + " for device " + device); in handleMessage()
147 processInitProfilePriorities(device, uuidsToSend); in handleMessage()
153 BluetoothDevice device = in handleMessage() local
157 processProfileStateChanged(device, msg.arg1, nextState, prevState); in handleMessage()
194 private void processInitProfilePriorities(BluetoothDevice device, ParcelUuid[] uuids) { in processInitProfilePriorities() argument
195 debugLog("processInitProfilePriorities() - device " + device + " UUIDs " + uuids); in processInitProfilePriorities()
206 && (hidService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)) { in processInitProfilePriorities()
207 hidService.setPriority(device, BluetoothProfile.PRIORITY_ON); in processInitProfilePriorities()
214 && (headsetService.getPriority(device) in processInitProfilePriorities()
[all …]
DRemoteDevices.java77 DeviceProperties getDeviceProperties(BluetoothDevice device) { in getDeviceProperties() argument
79 return mDevices.get(device.getAddress()); in getDeviceProperties()
102 for (BluetoothDevice device : mAdapterService.getBondedDevices()) { in addDeviceProperties()
103 if (device.getAddress().equals(deleteKey)) return prop; in addDeviceProperties()
204 void setAlias(BluetoothDevice device, String mAlias) { in setAlias() argument
210 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in setAlias()
261 private void sendUuidIntent(BluetoothDevice device) { in sendUuidIntent() argument
262 DeviceProperties prop = getDeviceProperties(device); in sendUuidIntent()
264 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device); in sendUuidIntent()
269 mSdpTracker.remove(device); in sendUuidIntent()
[all …]
DAdapterService.java987 public boolean createBond(BluetoothDevice device, int transport) { in createBond() argument
995 return service.createBond(device, transport, null); in createBond()
998 public boolean createBondOutOfBand(BluetoothDevice device, int transport, OobData oobData) { in createBondOutOfBand() argument
1006 return service.createBond(device, transport, oobData); in createBondOutOfBand()
1009 public boolean cancelBondProcess(BluetoothDevice device) { in cancelBondProcess() argument
1017 return service.cancelBondProcess(device); in cancelBondProcess()
1020 public boolean removeBond(BluetoothDevice device) { in removeBond() argument
1028 return service.removeBond(device); in removeBond()
1031 public int getBondState(BluetoothDevice device) { in getBondState() argument
1035 return service.getBondState(device); in getBondState()
[all …]
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/
DUsbDeviceHandlerResolver.java59 UsbDevice device, List<UsbDeviceSettings> availableSettings); in onHandlersResolveCompleted() argument
165 DeviceFilter(UsbDevice device) { in DeviceFilter() argument
166 mVendorId = device.getVendorId(); in DeviceFilter()
167 mProductId = device.getProductId(); in DeviceFilter()
168 mClass = device.getDeviceClass(); in DeviceFilter()
169 mSubclass = device.getDeviceSubclass(); in DeviceFilter()
170 mProtocol = device.getDeviceProtocol(); in DeviceFilter()
171 mManufacturerName = device.getManufacturerName(); in DeviceFilter()
172 mProductName = device.getProductName(); in DeviceFilter()
173 mSerialNumber = device.getSerialNumber(); in DeviceFilter()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/pan/
DPanService.java168 BluetoothDevice device = (BluetoothDevice) msg.obj;
169 if (!connectPanNative(Utils.getByteAddress(device),
171 handlePanDeviceStateChange(device, null, BluetoothProfile.STATE_CONNECTING,
173 handlePanDeviceStateChange(device, null,
182 BluetoothDevice device = (BluetoothDevice) msg.obj;
183 if (!disconnectPanNative(Utils.getByteAddress(device)) ) {
184 handlePanDeviceStateChange(device, mPanIfName,
187 handlePanDeviceStateChange(device, mPanIfName,
197 BluetoothDevice device = getDevice(cs.addr);
200 log("MESSAGE_CONNECT_STATE_CHANGED: " + device + " state: " + cs.state);
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/pbapclient/
DPbapClientService.java104 void cleanupDevice(BluetoothDevice device) { in cleanupDevice() argument
105 Log.w(TAG, "Cleanup device: " + device); in cleanupDevice()
107 PbapClientStateMachine pbapClientStateMachine = mPbapClientStateMachineMap.get(device); in cleanupDevice()
109 mPbapClientStateMachineMap.remove(device); in cleanupDevice()
138 BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); in onReceive() local
139 if (getConnectionState(device) == BluetoothProfile.STATE_CONNECTED) { in onReceive()
140 disconnect(device); in onReceive()
180 public boolean connect(BluetoothDevice device) { in connect() argument
187 return service.connect(device); in connect()
191 public boolean disconnect(BluetoothDevice device) { in disconnect() argument
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/mapclient/
DMapClientService.java83 public synchronized boolean connect(BluetoothDevice device) { in connect() argument
84 Log.d(TAG, "MAP Mce connect " + device.toString()); in connect()
85 return mMceStateMachine.connect(device); in connect()
88 public synchronized boolean disconnect(BluetoothDevice device) { in disconnect() argument
89 Log.d(TAG, "MAP Mce disconnect " + device.toString()); in disconnect()
90 return mMceStateMachine.disconnect(device); in disconnect()
102 for (BluetoothDevice device : bondedDevices) { in getDevicesMatchingConnectionStates()
103 connectionState = getConnectionState(device); in getDevicesMatchingConnectionStates()
104 Log.d(TAG, "Device: " + device + "State: " + connectionState); in getDevicesMatchingConnectionStates()
107 deviceList.add(device); in getDevicesMatchingConnectionStates()
[all …]
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/bluetooth/
DBluetoothScanner.java100 public void onDeviceAdded(Device device) { in onDeviceAdded() argument
102 public void onDeviceChanged(Device device) { in onDeviceChanged() argument
104 public void onDeviceRemoved(Device device) { in onDeviceRemoved() argument
153 public static void removeDevice(Device device) { in removeDevice() argument
154 removeDevice(device.address); in removeDevice()
388 Device device = null; in onReceive() local
393 device = d; in onReceive()
398 if (device == null) { in onReceive()
403 device = new Device(); in onReceive()
404 device.btDevice = btDevice; in onReceive()
[all …]
/packages/apps/Bluetooth/src/com/android/bluetooth/hdp/
DHealthService.java262 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/TvSettings/Settings/src/com/android/tv/settings/accessories/
DBluetoothDevicePairer.java151 public void onDeviceAdded(BluetoothScanner.Device device) {
153 Log.d(TAG, "Adding device: " + device.btDevice.getAddress());
155 onDeviceFound(device.btDevice);
159 public void onDeviceRemoved(BluetoothScanner.Device device) {
161 Log.d(TAG, "Device lost: " + device.btDevice.getAddress());
163 onDeviceLost(device.btDevice);
171 InputDevice device = inMan.getInputDevice(deviceIds[ptr]); in hasValidInputDevice() local
172 int sources = device.getSources(); in hasValidInputDevice()
186 String keyboardName = device.getName(); in hasValidInputDevice()
199 if (!device.isVirtual() && isCompatible) { in hasValidInputDevice()
[all …]
/packages/services/Car/service/src/com/android/car/
DBluetoothDevicesInfo.java102 public DeviceInfo(BluetoothDevice device, int state) { in DeviceInfo() argument
103 mBluetoothDevice = device; in DeviceInfo()
137 private int getPositionInListLocked(BluetoothDevice device) { in getPositionInListLocked() argument
142 if (devInfo.mBluetoothDevice.getAddress().equals(device.getAddress())) { in getPositionInListLocked()
158 private boolean checkDeviceInListLocked(BluetoothDevice device) { in checkDeviceInListLocked() argument
160 if (device == null) { in checkDeviceInListLocked()
164 if (devInfo.mBluetoothDevice.getAddress().equals(device.getAddress())) { in checkDeviceInListLocked()
172 private DeviceInfo findDeviceInfoInListLocked(@Nullable BluetoothDevice device) { in findDeviceInfoInListLocked() argument
173 if (device == null) { in findDeviceInfoInListLocked()
177 if (devInfo.mBluetoothDevice.getAddress().equals(device.getAddress())) { in findDeviceInfoInListLocked()
[all …]

12345678910>>...13