Lines Matching refs:device

58      *   <li> {@link BluetoothDevice#EXTRA_DEVICE} - The remote device. </li>
271 * Initiate connection to a profile of the remote bluetooth device.
276 * device is already connected or Bluetooth is not turned on.
285 * @param device Remote Bluetooth Device
290 public boolean connect(BluetoothDevice device) {
291 if (DBG) log("connect(" + device + ")");
292 if (mService != null && isEnabled() && isValidDevice(device)) {
294 return mService.connect(device);
308 * Bluetooth device is not in connected state etc. When this API returns,
313 * <p> If the disconnection is initiated by a remote device, the state
316 * host (local) device the state will transition from
325 * @param device Remote Bluetooth Device
330 public boolean disconnect(BluetoothDevice device) {
331 if (DBG) log("disconnect(" + device + ")");
332 if (mService != null && isEnabled() && isValidDevice(device)) {
334 return mService.disconnect(device);
381 public int getConnectionState(BluetoothDevice device) {
382 if (VDBG) log("getState(" + device + ")");
383 if (mService != null && isEnabled() && isValidDevice(device)) {
385 return mService.getConnectionState(device);
398 * <p> The device should already be paired.
405 * @param device Paired bluetooth device
410 public boolean setPriority(BluetoothDevice device, int priority) {
411 if (DBG) log("setPriority(" + device + ", " + priority + ")");
412 if (mService != null && isEnabled() && isValidDevice(device)) {
418 return mService.setPriority(device, priority);
437 * @param device Bluetooth device
438 * @return priority of the device
441 public int getPriority(BluetoothDevice device) {
442 if (VDBG) log("getPriority(" + device + ")");
443 if (mService != null && isEnabled() && isValidDevice(device)) {
445 return mService.getPriority(device);
478 private boolean isValidDevice(BluetoothDevice device) {
479 if (device == null) return false;
481 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true;
487 * Initiate virtual unplug for a HID input device.
491 * @param device Remote Bluetooth Device
496 public boolean virtualUnplug(BluetoothDevice device) {
497 if (DBG) log("virtualUnplug(" + device + ")");
498 if (mService != null && isEnabled() && isValidDevice(device)) {
500 return mService.virtualUnplug(device);
513 * Send Get_Protocol_Mode command to the connected HID input device.
517 * @param device Remote Bluetooth Device
522 public boolean getProtocolMode(BluetoothDevice device) {
523 if (VDBG) log("getProtocolMode(" + device + ")");
524 if (mService != null && isEnabled() && isValidDevice(device)) {
526 return mService.getProtocolMode(device);
537 * Send Set_Protocol_Mode command to the connected HID input device.
541 * @param device Remote Bluetooth Device
546 public boolean setProtocolMode(BluetoothDevice device, int protocolMode) {
547 if (DBG) log("setProtocolMode(" + device + ")");
548 if (mService != null && isEnabled() && isValidDevice(device)) {
550 return mService.setProtocolMode(device, protocolMode);
561 * Send Get_Report command to the connected HID input device.
565 * @param device Remote Bluetooth Device
573 public boolean getReport(BluetoothDevice device, byte reportType, byte reportId, int bufferSize) {
574 if (VDBG) log("getReport(" + device + "), reportType=" + reportType + " reportId=" + reportId + "bufferSize=" + bufferSize);
575 if (mService != null && isEnabled() && isValidDevice(device)) {
577 return mService.getReport(device, reportType, reportId, bufferSize);
588 * Send Set_Report command to the connected HID input device.
592 * @param device Remote Bluetooth Device
599 public boolean setReport(BluetoothDevice device, byte reportType, String report) {
600 if (DBG) log("setReport(" + device + "), reportType=" + reportType + " report=" + report);
601 if (mService != null && isEnabled() && isValidDevice(device)) {
603 return mService.setReport(device, reportType, report);
614 * Send Send_Data command to the connected HID input device.
618 * @param device Remote Bluetooth Device
624 public boolean sendData(BluetoothDevice device, String report) {
625 if (DBG) log("sendData(" + device + "), report=" + report);
626 if (mService != null && isEnabled() && isValidDevice(device)) {
628 return mService.sendData(device, report);