diff options
| author | Jaikumar Ganesh <jaikumar@google.com> | 2012-01-25 16:16:48 -0800 |
|---|---|---|
| committer | Matthew Xie <mattx@google.com> | 2012-07-13 22:22:51 -0700 |
| commit | e4caddbb7a3b39fd6a1ccf107c7dbf09bc8978e8 (patch) | |
| tree | 076ea4ea6e366ba1b7f5cbf8027b904bffddf790 /core/java/android/bluetooth/BluetoothSocket.java | |
| parent | 1abb1cb3a8fe17f7866150604c2fd73751da787e (diff) | |
Changes for new Bluetooth APIs.
Changes to Bluetooth Adapter, Device and IBluetooth interfaces
for new Bluetooth APIs. Delete AudioGateway.
Change-Id: Ib51b31187eafde261441b9311b5e7e13c8bff82f
Diffstat (limited to 'core/java/android/bluetooth/BluetoothSocket.java')
| -rw-r--r-- | core/java/android/bluetooth/BluetoothSocket.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java index 20e8515608af..2662f391694a 100644 --- a/core/java/android/bluetooth/BluetoothSocket.java +++ b/core/java/android/bluetooth/BluetoothSocket.java @@ -150,11 +150,14 @@ public final class BluetoothSocket implements Closeable { } else { mAddress = device.getAddress(); } + + //TODO(BT) + /* if (fd == -1) { initSocketNative(); } else { initSocketFromFdNative(fd); - } + }*/ mInputStream = new BluetoothInputStream(this); mOutputStream = new BluetoothOutputStream(this); mSocketState = SocketState.INIT; @@ -227,6 +230,8 @@ public final class BluetoothSocket implements Closeable { */ public void close() throws IOException { // abort blocking operations on the socket + //TODO(BT) + /* mLock.readLock().lock(); try { if (mSocketState == SocketState.CLOSED) return; @@ -248,7 +253,7 @@ public final class BluetoothSocket implements Closeable { } } finally { mLock.writeLock().unlock(); - } + }*/ } /** @@ -296,13 +301,16 @@ public final class BluetoothSocket implements Closeable { * so that BluetoothAdapter can check the error code for EADDRINUSE */ /*package*/ int bindListen() { + return -1; + //TODO(BT) + /* mLock.readLock().lock(); try { if (mSocketState == SocketState.CLOSED) return EBADFD; return bindListenNative(); } finally { mLock.readLock().unlock(); - } + }*/ } /*package*/ BluetoothSocket accept(int timeout) throws IOException { @@ -388,9 +396,11 @@ public final class BluetoothSocket implements Closeable { channel = -1; boolean inProgress = false; + //TODO(BT) + /* try { inProgress = service.fetchRemoteUuids(device.getAddress(), uuid, this); - } catch (RemoteException e) {Log.e(TAG, "", e);} + } catch (RemoteException e) {Log.e(TAG, "", e);}*/ if (!inProgress) throw new IOException("Unable to start Service Discovery"); |
