- synchronized (AltosBluetooth.this) {
- /* Reset the ConnectThread because we're done
- */
- connect_thread = null;
- }
- if (D) Log.d(TAG, "ConnectThread: Connect completed");
- }
-
- public void cancel() {
- try {
- BluetoothSocket local_socket;
- synchronized(AltosBluetooth.this) {
- local_socket = socket;
- socket = null;
- }
- if (local_socket != null)
- local_socket.close();
-
- } catch (IOException e) {
- if (D) Log.e(TAG, "ConnectThread: close() of connect socket failed", e);
- }