Lines Matching refs:device
116 Log.w(TAG, "Stopping BluetoothHeadsetService: device does not have BT");
236 BluetoothDevice device =
242 device.equals(mRemoteDevice)) {
267 if (mHeadsetPriority.get(device) == BluetoothHeadset.PRIORITY_UNDEFINED) {
268 mHeadsetPriority.set(device, BluetoothHeadset.PRIORITY_ON);
272 mHeadsetPriority.set(device, BluetoothHeadset.PRIORITY_UNDEFINED);
283 if (device.equals(mDeviceSdpQuery)) {
284 // We have got SDP records for the device we are interested in.
326 private BluetoothDevice device;
333 public RfcommConnectThread(BluetoothDevice device, int channel, int type) {
335 this.device = device;
359 HeadsetBase headset = new HeadsetBase(mPowerManager, mAdapter, device, channel);
368 device.fetchUuidsWithSdp();
541 BluetoothDevice device = i.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
542 if (device != null && autoConnectDevice.equals(device)) {
565 public boolean connectHeadset(BluetoothDevice device) {
571 Log.w(TAG, "connectHeadset(" + device + "): failed: already in state " +
575 if (device == null) {
579 mRemoteDevice = device;
592 public boolean isConnected(BluetoothDevice device) {
594 return mState == BluetoothHeadset.STATE_CONNECTED && mRemoteDevice.equals(device);
661 public boolean setPriority(BluetoothDevice device, int priority) {
667 mHeadsetPriority.set(device, priority);
670 public int getPriority(BluetoothDevice device) {
673 return mHeadsetPriority.get(device);
705 for (BluetoothDevice device : devices) {
706 load(device);
711 private synchronized int load(BluetoothDevice device) {
713 Settings.Secure.getBluetoothHeadsetPriorityKey(device.getAddress()),
715 mPriority.put(device, new Integer(priority));
716 if (DBG) log("Loaded priority " + device + " = " + priority);
720 public synchronized int get(BluetoothDevice device) {
721 Integer priority = mPriority.get(device);
723 return load(device);
728 public synchronized void set(BluetoothDevice device, int priority) {
729 int oldPriority = get(device);
733 mPriority.put(device, new Integer(priority));
735 Settings.Secure.getBluetoothHeadsetPriorityKey(device.getAddress()),
737 if (DBG) log("Saved priority " + device + " = " + priority);
741 public synchronized void bump(BluetoothDevice device) {
742 int oldPriority = get(device);
747 if (device.equals(d)) continue;
755 set(device, p);
771 BluetoothDevice device = li.previous();
772 set(device, priority);
788 for (BluetoothDevice device : toSort.keySet()) {
789 int priority = toSort.get(device).intValue();
791 maxDevice = device;