Lines Matching refs:device

122     int getPanDeviceConnectionState(BluetoothDevice device) {
123 BluetoothPanDevice panDevice = mPanDevices.get(device);
130 boolean connectPanDevice(BluetoothDevice device) {
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: mPanDevices.keySet()) {
167 BluetoothPanDevice panDevice = mPanDevices.get(device);
171 String objectPath = mBluetoothService.getObjectPathFromAddress(device.getAddress());
173 handlePanDeviceStateChange(device, panDevice.mIface,
177 device.getAddress(),
179 errorLog("could not disconnect Pan Server Device "+device.getAddress());
182 handlePanDeviceStateChange(device, panDevice.mIface, state,
195 for (BluetoothDevice device: mPanDevices.keySet()) {
196 if (getPanDeviceConnectionState(device) == BluetoothPan.STATE_CONNECTED) {
197 devices.add(device);
206 for (BluetoothDevice device: mPanDevices.keySet()) {
207 int panDeviceState = getPanDeviceConnectionState(device);
210 devices.add(device);
218 boolean disconnectPanDevice(BluetoothDevice device) {
219 String objectPath = mBluetoothService.getObjectPathFromAddress(device.getAddress());
222 int state = getPanDeviceConnectionState(device);
224 debugLog(device + " already disconnected from PAN");
228 BluetoothPanDevice panDevice = mPanDevices.get(device);
231 errorLog("No record for this Pan device:" + device);
235 handlePanDeviceStateChange(device, panDevice.mIface, BluetoothPan.STATE_DISCONNECTING,
238 if (!mBluetoothService.disconnectPanServerDeviceNative(objectPath, device.getAddress(),
241 handlePanDeviceStateChange(device, panDevice.mIface, state, panDevice.mLocalRole);
247 handlePanDeviceStateChange(device, panDevice.mIface, state, panDevice.mLocalRole);
254 void handlePanDeviceStateChange(BluetoothDevice device,
258 BluetoothPanDevice panDevice = mPanDevices.get(device);
281 BluetoothTetheringDataTracker.getInstance().startReverseTether(iface, device);
291 mPanDevices.put(device, panDevice);
300 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, device);
306 debugLog("Pan Device state : device: " + device + " State:" + prevState + "->" + state);
307 mBluetoothService.sendConnectionStateChange(device, BluetoothProfile.PAN, state,
315 private int mLocalRole; // Which local role is this PAN device bound to
327 debugLog ("Max PAN device connections reached");