Searched refs:device (Results 1 - 25 of 96) sorted by relevance

1234

/frameworks/base/core/java/android/bluetooth/
H A DIBluetoothA2dp.aidl28 boolean connect(in BluetoothDevice device);
29 boolean disconnect(in BluetoothDevice device);
32 int getConnectionState(in BluetoothDevice device);
33 boolean setPriority(in BluetoothDevice device, int priority);
34 int getPriority(in BluetoothDevice device);
35 boolean isA2dpPlaying(in BluetoothDevice device);
38 boolean suspendSink(in BluetoothDevice device);
39 boolean resumeSink(in BluetoothDevice device);
40 boolean connectSinkInternal(in BluetoothDevice device);
41 boolean disconnectSinkInternal(in BluetoothDevice device);
[all...]
H A DIBluetoothHeadset.aidl28 boolean connect(in BluetoothDevice device);
29 boolean disconnect(in BluetoothDevice device);
32 int getConnectionState(in BluetoothDevice device);
33 boolean setPriority(in BluetoothDevice device, int priority);
34 int getPriority(in BluetoothDevice device);
35 boolean startVoiceRecognition(in BluetoothDevice device);
36 boolean stopVoiceRecognition(in BluetoothDevice device);
37 boolean isAudioConnected(in BluetoothDevice device);
40 int getBatteryUsageHint(in BluetoothDevice device);
43 boolean createIncomingConnect(in BluetoothDevice device);
[all...]
H A DIBluetoothPbap.aidl29 boolean connect(in BluetoothDevice device);
31 boolean isConnected(in BluetoothDevice device);
H A DBluetoothA2dp.java41 * <p> Android only supports one connected Bluetooth A2dp device at a time.
56 * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
78 * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
92 * A2DP sink device is streaming music. This state can be one of
99 * A2DP sink device is NOT streaming music. This state can be one of
137 * Initiate connection to a profile of the remote bluetooth device.
144 * device is already connected or Bluetooth is not turned on.
153 * @param device Remote Bluetooth Device
158 public boolean connect(BluetoothDevice device) { argument
159 if (DBG) log("connect(" + device
199 disconnect(BluetoothDevice device) argument
251 getConnectionState(BluetoothDevice device) argument
281 setPriority(BluetoothDevice device, int priority) argument
313 getPriority(BluetoothDevice device) argument
335 isA2dpPlaying(BluetoothDevice device) argument
366 suspendSink(BluetoothDevice device) argument
396 resumeSink(BluetoothDevice device) argument
416 shouldSendVolumeKeys(BluetoothDevice device) argument
437 allowIncomingConnect(BluetoothDevice device, boolean value) argument
477 isValidDevice(BluetoothDevice device) argument
[all...]
H A DBluetoothInputDevice.java54 * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
126 * Initiate connection to a profile of the remote bluetooth device.
131 * device is already connected or Bluetooth is not turned on.
140 * @param device Remote Bluetooth Device
145 public boolean connect(BluetoothDevice device) { argument
146 if (DBG) log("connect(" + device + ")");
148 isValidDevice(device)) {
150 return mService.connectInputDevice(device);
164 * Bluetooth device is not in connected state etc. When this API returns,
169 * <p> If the disconnection is initiated by a remote device, th
186 disconnect(BluetoothDevice device) argument
238 getConnectionState(BluetoothDevice device) argument
268 setPriority(BluetoothDevice device, int priority) argument
300 getPriority(BluetoothDevice device) argument
320 isValidDevice(BluetoothDevice device) argument
[all...]
H A DBluetoothHeadset.java58 * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
79 * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
252 * Initiate connection to a profile of the remote bluetooth device.
259 * device is already connected or Bluetooth is not turned on.
268 * @param device Remote Bluetooth Device
273 public boolean connect(BluetoothDevice device) { argument
274 if (DBG) log("connect(" + device + ")");
276 isValidDevice(device)) {
278 return mService.connect(device);
292 * Bluetooth device i
314 disconnect(BluetoothDevice device) argument
366 getConnectionState(BluetoothDevice device) argument
396 setPriority(BluetoothDevice device, int priority) argument
428 getPriority(BluetoothDevice device) argument
464 startVoiceRecognition(BluetoothDevice device) argument
488 stopVoiceRecognition(BluetoothDevice device) argument
511 isAudioConnected(BluetoothDevice device) argument
539 getBatteryUsageHint(BluetoothDevice device) argument
589 acceptIncomingConnect(BluetoothDevice device) argument
608 createIncomingConnect(BluetoothDevice device) argument
625 rejectIncomingConnect(BluetoothDevice device) argument
644 connectHeadsetInternal(BluetoothDevice device) argument
663 disconnectHeadsetInternal(BluetoothDevice device) argument
682 setAudioState(BluetoothDevice device, int state) argument
701 getAudioState(BluetoothDevice device) argument
725 startScoUsingVirtualVoiceCall(BluetoothDevice device) argument
748 stopScoUsingVirtualVoiceCall(BluetoothDevice device) argument
791 isValidDevice(BluetoothDevice device) argument
[all...]
H A DBluetoothHealthCallback.java54 * @param device The Bluetooth Device
62 BluetoothDevice device, int prevState, int newState, ParcelFileDescriptor fd,
64 Log.d(TAG, "onHealthChannelStateChange: " + config + "Device: " + device +
61 onHealthChannelStateChange(BluetoothHealthAppConfiguration config, BluetoothDevice device, int prevState, int newState, ParcelFileDescriptor fd, int channelId) argument
H A DBluetoothPan.java54 * <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
55 * <li> {@link #EXTRA_LOCAL_ROLE} - Which local role the remote device is
74 * The local role of the PAN profile that the remote device is bound to.
80 * The local device is acting as a Network Access Point.
85 * The local device is acting as a PAN User.
147 * Initiate connection to a profile of the remote bluetooth device.
150 * device is already connected or Bluetooth is not turned on.
159 * @param device Remote Bluetooth Device
164 public boolean connect(BluetoothDevice device) { argument
165 if (DBG) log("connect(" + device
205 disconnect(BluetoothDevice device) argument
257 getConnectionState(BluetoothDevice device) argument
296 isValidDevice(BluetoothDevice device) argument
[all...]
H A DIBluetooth.aidl89 boolean allowIncomingProfileConnect(in BluetoothDevice device, boolean value);
96 boolean connectInputDevice(in BluetoothDevice device);
97 boolean disconnectInputDevice(in BluetoothDevice device);
100 int getInputDeviceConnectionState(in BluetoothDevice device);
101 boolean setInputDevicePriority(in BluetoothDevice device, int priority);
102 int getInputDevicePriority(in BluetoothDevice device);
106 int getPanDeviceConnectionState(in BluetoothDevice device);
109 boolean connectPanDevice(in BluetoothDevice device);
110 boolean disconnectPanDevice(in BluetoothDevice device);
116 boolean connectChannelToSource(in BluetoothDevice device, i
[all...]
H A DBluetoothHealth.java35 * <p> How to connect to a health device which is acting in the source role.
41 * <li> Pair with the remote device. This currently needs to be done manually
43 * <li> Connect to a health device using {@link #connectChannelToSource}. Some
60 * Health Profile Source Role - the health device.
65 * Health Profile Sink Role the device talking to the health device.
187 * Connect to a health device which has the {@link #SOURCE_ROLE}.
193 * @param device The remote Bluetooth device.
198 public boolean connectChannelToSource(BluetoothDevice device, argument
227 connectChannelToSink(BluetoothDevice device, BluetoothHealthAppConfiguration config, int channelType) argument
256 disconnectChannel(BluetoothDevice device, BluetoothHealthAppConfiguration config, int channelId) argument
285 getMainChannelFd(BluetoothDevice device, BluetoothHealthAppConfiguration config) argument
317 getConnectionState(BluetoothDevice device) argument
404 onHealthChannelStateChange(BluetoothHealthAppConfiguration config, BluetoothDevice device, int prevState, int newState, ParcelFileDescriptor fd, int channelId) argument
467 isValidDevice(BluetoothDevice device) argument
[all...]
/frameworks/base/services/input/
H A DEventHub.cpp201 Device* device = mClosingDevices;
202 mClosingDevices = device->next;
203 delete device;
216 Device* device = getDeviceLocked(deviceId);
217 if (device == NULL) return String8();
218 return device->identifier.name;
223 Device* device = getDeviceLocked(deviceId);
224 if (device == NULL) return 0;
225 return device->classes;
230 Device* device
[all...]
/frameworks/base/wifi/java/android/net/wifi/p2p/
H A DWifiP2pDeviceList.java29 * A class representing a Wi-Fi P2p device list
51 for (WifiP2pDevice device : devices) {
52 mDevices.add(device);
64 public void update(WifiP2pDevice device) { argument
65 if (device == null) return;
68 if (d.equals(device)) {
69 d.deviceName = device.deviceName;
70 d.primaryDeviceType = device.primaryDeviceType;
71 d.secondaryDeviceType = device.secondaryDeviceType;
72 d.wpsConfigMethodsSupported = device
83 remove(WifiP2pDevice device) argument
[all...]
/frameworks/base/core/java/android/server/
H A DBluetoothInputProfileHandler.java64 boolean connectInputDevice(BluetoothDevice device, argument
66 String objectPath = mBluetoothService.getObjectPathFromAddress(device.getAddress());
68 getInputDeviceConnectionState(device) != BluetoothInputDevice.STATE_DISCONNECTED ||
69 getInputDevicePriority(device) == BluetoothInputDevice.PRIORITY_OFF) {
82 boolean connectInputDeviceInternal(BluetoothDevice device) { argument
83 String objectPath = mBluetoothService.getObjectPathFromAddress(device.getAddress());
84 handleInputDeviceStateChange(device, BluetoothInputDevice.STATE_CONNECTING);
86 handleInputDeviceStateChange(device, BluetoothInputDevice.STATE_DISCONNECTED);
92 boolean disconnectInputDevice(BluetoothDevice device, argument
94 String objectPath = mBluetoothService.getObjectPathFromAddress(device
109 disconnectInputDeviceInternal(BluetoothDevice device) argument
119 getInputDeviceConnectionState(BluetoothDevice device) argument
137 getInputDevicePriority(BluetoothDevice device) argument
143 setInputDevicePriority(BluetoothDevice device, int priority) argument
167 handleInputDeviceStateChange(BluetoothDevice device, int state) argument
207 setInitialInputDevicePriority(BluetoothDevice device, int state) argument
[all...]
H A DBluetoothA2dpService.java73 BluetoothDevice device =
88 if (mAudioDevices.containsKey(device)) {
89 int state = mAudioDevices.get(device);
90 handleSinkStateChange(device, state, BluetoothA2dp.STATE_DISCONNECTED);
116 private boolean isPhoneDocked(BluetoothDevice device) { argument
123 if (dockDevice != null && device.equals(dockDevice)) {
182 private boolean isSinkDevice(BluetoothDevice device) { argument
183 ParcelUuid[] uuids = mBluetoothService.getRemoteUuids(device.getAddress());
190 private synchronized void addAudioSink(BluetoothDevice device) { argument
191 if (mAudioDevices.get(device)
242 isConnectSinkFeasible(BluetoothDevice device) argument
257 isA2dpPlaying(BluetoothDevice device) argument
265 connect(BluetoothDevice device) argument
280 connectSinkInternal(BluetoothDevice device) argument
317 isDisconnectSinkFeasible(BluetoothDevice device) argument
332 disconnect(BluetoothDevice device) argument
340 disconnectSinkInternal(BluetoothDevice device) argument
359 suspendSink(BluetoothDevice device) argument
376 resumeSink(BluetoothDevice device) argument
392 getConnectionState(BluetoothDevice device) argument
422 getPriority(BluetoothDevice device) argument
429 setPriority(BluetoothDevice device, int priority) argument
436 allowIncomingConnect(BluetoothDevice device, boolean value) argument
500 handleSinkStateChange(BluetoothDevice device, int prevState, int state) argument
531 handleSinkPlayingStateChange(BluetoothDevice device, int state, int prevState) argument
[all...]
H A DBluetoothHealthProfileHandler.java72 HealthChannel(BluetoothDevice device, BluetoothHealthAppConfiguration config, argument
77 mDevice = device;
190 boolean connectChannelToSource(BluetoothDevice device, argument
192 return connectChannel(device, config, BluetoothHealth.CHANNEL_TYPE_ANY);
195 private HealthChannel getMainChannel(BluetoothDevice device, argument
198 if (chan.mDevice.equals(device) && chan.mConfig.equals(config)) {
205 boolean connectChannel(BluetoothDevice device, argument
208 mBluetoothService.getObjectPathFromAddress(device.getAddress());
214 HealthChannel chan = new HealthChannel(device, config, null, false, null);
221 callHealthChannelCallback(config, device, prevStat
267 disconnectChannel(BluetoothDevice device, BluetoothHealthAppConfiguration config, int id) argument
303 findChannelByPath(BluetoothDevice device, String path) argument
310 findChannelByStates(BluetoothDevice device, int[] states) argument
324 findConnectingChannel(BluetoothDevice device, BluetoothHealthAppConfiguration config) argument
333 getMainChannelFd(BluetoothDevice device, BluetoothHealthAppConfiguration config) argument
404 findHealthApplication( BluetoothDevice device, String channelPath) argument
492 callHealthChannelCallback(BluetoothHealthAppConfiguration config, BluetoothDevice device, int prevState, int state, ParcelFileDescriptor fd, int id) argument
533 getHealthDeviceConnectionState(BluetoothDevice device) argument
585 broadcastHealthDeviceStateChange(BluetoothDevice device, int prevChannelState, int newChannelState) argument
636 updateAndSendIntent(BluetoothDevice device, int prevDeviceState, int newDeviceState) argument
[all...]
H A DBluetoothPanProfileHandler.java122 int getPanDeviceConnectionState(BluetoothDevice device) { argument
123 BluetoothPanDevice panDevice = mPanDevices.get(device);
130 boolean connectPanDevice(BluetoothDevice device) { argument
131 String objectPath = mBluetoothService.getObjectPathFromAddress(device.getAddress());
133 if (getPanDeviceConnectionState(device) != BluetoothPan.STATE_DISCONNECTED) {
134 errorLog(device + " already connected to PAN");
144 debugLog(device + " could not connect to PAN because 8 other devices are"
150 handlePanDeviceStateChange(device, null, BluetoothPan.STATE_CONNECTING,
156 handlePanDeviceStateChange(device, null, BluetoothPan.STATE_DISCONNECTED,
166 for (BluetoothDevice device
218 disconnectPanDevice(BluetoothDevice device) argument
254 handlePanDeviceStateChange(BluetoothDevice device, String iface, int state, int role) argument
[all...]
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/
H A DBluetoothStressTest.java75 * Stress test for putting the device in and taking the device out of discoverable mode.
144 * Stress test for pairing and unpairing with a remote device.
146 * In this test, the local device initiates pairing with a remote device, and then unpairs with
147 * the device after the pairing has successfully completed.
156 BluetoothDevice device = adapter.getRemoteDevice(BluetoothTestRunner.sDeviceAddress);
159 mTestUtils.unpair(adapter, device);
163 mTestUtils.pair(adapter, device, BluetoothTestRunner.sDevicePairPasskey,
165 mTestUtils.unpair(adapter, device);
[all...]
H A DBluetoothTestUtils.java153 public PairReceiver(BluetoothDevice device, int passkey, byte[] pin, int expectedFlags) { argument
156 mDevice = device;
213 public ConnectProfileReceiver(BluetoothDevice device, int profile, int expectedFlags) { argument
216 mDevice = device;
267 public ConnectPanReceiver(BluetoothDevice device, int role, int expectedFlags) { argument
268 super(device, BluetoothProfile.PAN, expectedFlags);
538 * Puts the local device into discoverable mode and checks to make sure that the local device
581 * Puts the local device into connectable only mode and checks to make sure that the local
582 * device i
744 pair(BluetoothAdapter adapter, BluetoothDevice device, int passkey, byte[] pin) argument
757 acceptPair(BluetoothAdapter adapter, BluetoothDevice device, int passkey, byte[] pin) argument
773 pairOrAcceptPair(BluetoothAdapter adapter, BluetoothDevice device, int passkey, byte[] pin, boolean shouldPair) argument
841 unpair(BluetoothAdapter adapter, BluetoothDevice device) argument
906 connectProfile(BluetoothAdapter adapter, BluetoothDevice device, int profile, String methodName) argument
987 disconnectProfile(BluetoothAdapter adapter, BluetoothDevice device, int profile, String methodName) argument
1064 connectPan(BluetoothAdapter adapter, BluetoothDevice device) argument
1075 incomingPanConnection(BluetoothAdapter adapter, BluetoothDevice device) argument
1088 connectPanOrIncomingPanConnection(BluetoothAdapter adapter, BluetoothDevice device, boolean connect) argument
1169 disconnectPan(BluetoothAdapter adapter, BluetoothDevice device) argument
1180 incomingPanDisconnection(BluetoothAdapter adapter, BluetoothDevice device) argument
1193 disconnectFromRemoteOrVerifyConnectNap(BluetoothAdapter adapter, BluetoothDevice device, boolean disconnect) argument
1273 startSco(BluetoothAdapter adapter, BluetoothDevice device) argument
1284 stopSco(BluetoothAdapter adapter, BluetoothDevice device) argument
1295 startStopSco(BluetoothAdapter adapter, BluetoothDevice device, boolean isStart) argument
1397 getPairReceiver(BluetoothDevice device, int passkey, byte[] pin, int expectedFlags) argument
1407 getConnectProfileReceiver(BluetoothDevice device, int profile, int expectedFlags) argument
1419 getConnectPanReceiver(BluetoothDevice device, int role, int expectedFlags) argument
[all...]
/frameworks/base/core/jni/
H A Dandroid_hardware_UsbDeviceConnection.cpp52 struct usb_device* device = usb_device_new(deviceNameStr, fd); local
53 if (device) {
54 env->SetIntField(thiz, field_context, (int)device);
61 return (device != NULL);
68 struct usb_device* device = get_device_from_object(env, thiz); local
69 if (device) {
70 usb_device_close(device);
78 struct usb_device* device = get_device_from_object(env, thiz); local
79 if (!device) {
80 LOGE("device i
111 struct usb_device* device = get_device_from_object(env, thiz); local
129 struct usb_device* device = get_device_from_object(env, thiz); local
147 struct usb_device* device = get_device_from_object(env, thiz); local
175 struct usb_device* device = get_device_from_object(env, thiz); local
201 struct usb_device* device = get_device_from_object(env, thiz); local
217 struct usb_device* device = get_device_from_object(env, thiz); local
[all...]
/frameworks/base/libs/usb/tests/AccessoryChat/accessorychat/
H A Daccessorychat.c77 static void send_string(struct usb_device *device, int index, const char* string) { argument
78 int ret = usb_device_control_transfer(device, USB_DIR_OUT | USB_TYPE_VENDOR,
92 struct usb_device *device = usb_device_open(devname); local
93 if (!device) {
98 vendorId = usb_device_get_vendor_id(device);
99 productId = usb_device_get_product_id(device);
109 printf("Found android device in accessory mode\n");
110 sDevice = device;
112 usb_descriptor_iter_init(device, &iter);
133 if (usb_device_claim_interface(device, int
[all...]
/frameworks/base/media/tests/CameraBrowser/src/com/android/camerabrowser/
H A DMtpClient.java44 * and notifies the application when the MTP device list changes.
57 // so we can inform when the device has been detached.
114 * Called when a new device has been added
116 * @param device the new device that was added
118 public void deviceAdded(MtpDevice device); argument
121 * Called when a new device has been removed
123 * @param device the device that was removed
125 public void deviceRemoved(MtpDevice device); argument
135 isCamera(UsbDevice device) argument
[all...]
/frameworks/base/core/java/android/app/backup/
H A DRestoreSet.java36 * Identifier of the device whose data this is. This will be as unique as
39 public String device; field in class:RestoreSet
55 device = _dev;
67 out.writeString(device);
84 device = in.readString();
/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/
H A DUsbDisconnectedReceiver.java29 // if their device/accessory is disconnected while the dialog is still open
35 public UsbDisconnectedReceiver(Activity activity, UsbDevice device) { argument
37 mDevice = device;
55 UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
56 if (device != null && device.equals(mDevice)) {
/frameworks/base/core/java/android/hardware/usb/
H A DIUsbManager.aidl31 /* Returns a file descriptor for communicating with the USB device.
44 /* Sets the default package for a USB device
47 void setDevicePackage(in UsbDevice device, String packageName);
54 /* Returns true if the caller has permission to access the device. */
55 boolean hasDevicePermission(in UsbDevice device);
60 /* Requests permission for the given package to access the device.
64 void requestDevicePermission(in UsbDevice device, String packageName, in PendingIntent pi);
73 /* Grants permission for the given UID to access the device */
74 void grantDevicePermission(in UsbDevice device, int uid);
/frameworks/base/media/jni/
H A Dandroid_mtp_MtpDevice.cpp111 MtpDevice* device = MtpDevice::open(deviceNameStr, fd); local
114 if (device)
115 env->SetIntField(thiz, field_context, (int)device);
116 return (device != NULL);
122 MtpDevice* device = get_device_from_object(env, thiz); local
123 if (device) {
124 device->close();
125 delete device;
133 MtpDevice* device = get_device_from_object(env, thiz); local
134 if (!device) {
170 MtpDevice* device = get_device_from_object(env, thiz); local
189 MtpDevice* device = get_device_from_object(env, thiz); local
224 MtpDevice* device = get_device_from_object(env, thiz); local
243 MtpDevice* device = get_device_from_object(env, thiz); local
317 MtpDevice* device = get_device_from_object(env, thiz); local
339 MtpDevice* device = get_device_from_object(env, thiz); local
357 MtpDevice* device = get_device_from_object(env, thiz); local
367 MtpDevice* device = get_device_from_object(env, thiz); local
377 MtpDevice* device = get_device_from_object(env, thiz); local
387 MtpDevice* device = get_device_from_object(env, thiz); local
[all...]

Completed in 421 milliseconds

1234