Lines Matching defs:device

35  * <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,
200 if (mService != null && isEnabled() && isValidDevice(device) &&
203 return mService.connectChannelToSource(device, config);
215 * Connect to a health device which has the {@link #SINK_ROLE}.
221 * @param device The remote Bluetooth device.
227 public boolean connectChannelToSink(BluetoothDevice device,
229 if (mService != null && isEnabled() && isValidDevice(device) &&
232 return mService.connectChannelToSink(device, config, channelType);
250 * @param device The remote Bluetooth device.
256 public boolean disconnectChannel(BluetoothDevice device,
258 if (mService != null && isEnabled() && isValidDevice(device) &&
261 return mService.disconnectChannel(device, config, channelId);
273 * Get the file descriptor of the main channel associated with the remote device
281 * @param device The remote Bluetooth health device
285 public ParcelFileDescriptor getMainChannelFd(BluetoothDevice device,
287 if (mService != null && isEnabled() && isValidDevice(device) &&
290 return mService.getMainChannelFd(device, config);
307 * state of the local Bluetooth adapter with the remote device. This can be used
311 * @param device Remote bluetooth device.
317 public int getConnectionState(BluetoothDevice device) {
318 if (mService != null && isEnabled() && isValidDevice(device)) {
320 return mService.getHealthDeviceConnectionState(device);
405 BluetoothDevice device, int prevState, int newState,
407 mCallback.onHealthChannelStateChange(config, device, prevState, newState, fd,
467 private boolean isValidDevice(BluetoothDevice device) {
468 if (device == null) return false;
470 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true;