diff options
author | Scott Main <smain@google.com> | 2009-11-19 17:00:19 -0800 |
---|---|---|
committer | Scott Main <smain@google.com> | 2009-11-19 17:06:54 -0800 |
commit | a7848ce834a484d194d05afd8097ab3014f9b449 (patch) | |
tree | 51e1b661ca6f22cab373697ee5c74e490d294c6a /framework/java/android/bluetooth/BluetoothServerSocket.java | |
parent | beef809fa89a5e7955a4c25cf70e00adbcf2e24e (diff) |
docs for ESR: add docs to bluetooth explainin that discovery should
be cancelled before connecting to a device
bug: 2160782,2198463
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothServerSocket.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothServerSocket.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/framework/java/android/bluetooth/BluetoothServerSocket.java b/framework/java/android/bluetooth/BluetoothServerSocket.java index 1b23f6c048..c9c6c0acd9 100644 --- a/framework/java/android/bluetooth/BluetoothServerSocket.java +++ b/framework/java/android/bluetooth/BluetoothServerSocket.java @@ -42,7 +42,11 @@ import java.io.IOException; * BluetoothAdapter.listenUsingRfcommWithServiceRecord()}. Then call * {@link #accept()} to listen for incoming connection requests. This call * will block until a connection is established, at which point, it will return - * a {@link BluetoothSocket} to manage the connection. + * a {@link BluetoothSocket} to manage the connection. Once the {@link + * BluetoothSocket} is acquired, it's a good idea to call {@link #close()} on + * the {@link BluetoothServerSocket} when it's no longer needed for accepting + * connections. Closing the {@link BluetoothServerSocket} will <em>not</em> + * close the returned {@link BluetoothSocket}. * * <p>{@link BluetoothServerSocket} is thread * safe. In particular, {@link #close} will always immediately abort ongoing @@ -105,6 +109,8 @@ public final class BluetoothServerSocket implements Closeable { * Immediately close this socket, and release all associated resources. * <p>Causes blocked calls on this socket in other threads to immediately * throw an IOException. + * <p>Closing the {@link BluetoothServerSocket} will <em>not</em> + * close any {@link BluetoothSocket} received from {@link #accept()}. */ public void close() throws IOException { synchronized (this) { |