OSDN Git Service

Add javadoc to explain which permissions are required for Public BT API's.
authorNick Pelly <npelly@google.com>
Tue, 8 Sep 2009 17:12:06 +0000 (10:12 -0700)
committerNick Pelly <npelly@google.com>
Tue, 8 Sep 2009 17:12:06 +0000 (10:12 -0700)
core/java/android/bluetooth/BluetoothAdapter.java
core/java/android/bluetooth/BluetoothDevice.java
core/java/android/bluetooth/BluetoothServerSocket.java
core/java/android/bluetooth/BluetoothSocket.java

index 8975fe2..5a182f0 100644 (file)
@@ -303,6 +303,7 @@ public final class BluetoothAdapter {
      * <p>Use {@link BluetoothServerSocket#accept} to retrieve incoming
      * connections to listening {@link BluetoothServerSocket}.
      * <p>Valid RFCOMM channels are in range 1 to 30.
+     * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
      * @param channel RFCOMM channel to listen on
      * @return a listening RFCOMM BluetoothServerSocket
      * @throws IOException on error, for example Bluetooth not available, or
index 0ec3243..1b7011c 100644 (file)
@@ -357,6 +357,7 @@ public final class BluetoothDevice implements Parcelable {
      * <p>Use {@link BluetoothSocket#connect} to intiate the outgoing
      * connection.
      * <p>Valid RFCOMM channels are in range 1 to 30.
+     * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
      * @param channel RFCOMM channel to connect to
      * @return a RFCOMM BluetoothServerSocket ready for an outgoing connection
      * @throws IOException on error, for example Bluetooth not available, or
index b650841..45dc432 100644 (file)
@@ -45,6 +45,9 @@ import java.io.IOException;
  * <p>{@link BluetoothSocket} and {@link BluetoothServerSocket} are thread
  * safe. In particular, {@link #close} will always immediately abort ongoing
  * operations and close the socket.
+ *
+ * <p>All methods on a {@link BluetoothServerSocket} require
+ * {@link android.Manifest.permission#BLUETOOTH}
  */
 public final class BluetoothServerSocket implements Closeable {
 
index ccbe23e..e462ea6 100644 (file)
@@ -49,6 +49,9 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
  * <p>{@link BluetoothSocket} and {@link BluetoothServerSocket} are thread
  * safe. In particular, {@link #close} will always immediately abort ongoing
  * operations and close the socket.
+ *
+ * <p>All methods on a {@link BluetoothSocket} require
+ * {@link android.Manifest.permission#BLUETOOTH}
  */
 public final class BluetoothSocket implements Closeable {
     /** Keep TYPE_ fields in sync with BluetoothSocket.cpp */