// Name of the connected device
private BluetoothDevice device = null;
- private String mConnectedDeviceName = null;
private AltosBluetooth mAltosBluetooth = null;
private int state = STATE_NONE;
LinkedBlockingQueue<AltosLine> telem;
break;
case MSG_CONNECTED:
if (D) Log.d(TAG, "Connected to device");
- s.mConnectedDeviceName = s.device.getName();
- s.sendMessageToClients(Message.obtain(null, AltosDroid.MSG_DEVNAME, s.mConnectedDeviceName));
+ s.sendMessageToClients(Message.obtain(null, AltosDroid.MSG_DEVNAME, s.device.getName()));
s.setState(STATE_CONNECTED);
s.mAltosBluetooth.add_monitor(s.telem);
break;
mAltosBluetooth.close();
mAltosBluetooth = null;
}
- mConnectedDeviceName = null;
device = null;
telem.clear();
}