diff options
| author | Zach Johnson <zachoverflow@google.com> | 2020-08-20 02:44:09 +0000 |
|---|---|---|
| committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-08-20 02:44:09 +0000 |
| commit | bfc789080d336b84aaeeeff87641eea16d0ec873 (patch) | |
| tree | e289f0b7bca99a58008497b5e09b76bb7fa1ca0e /framework/java/android/bluetooth/BluetoothAdapter.java | |
| parent | d7209e36ba1f5c9a87abc2985136ab3e2028dabe (diff) | |
| parent | 573f9d5f471c01a9945bc62aa7de934e22736de1 (diff) | |
Merge "Remove listenUsingEncryptedRfcommOn & listenUsingScoOn" am: 22399aae26 am: 573f9d5f47
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404838
Change-Id: Idcfc40762221d456374fdf7ee3f96123a137a793
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
| -rw-r--r-- | framework/java/android/bluetooth/BluetoothAdapter.java | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java index de591bd1f1..f062a39c6f 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -2640,52 +2640,6 @@ public final class BluetoothAdapter { } /** - * Construct an encrypted, RFCOMM server socket. - * Call #accept to retrieve connections to this socket. - * - * @return An RFCOMM BluetoothServerSocket - * @throws IOException On error, for example Bluetooth not available, or insufficient - * permissions. - * @hide - */ - public BluetoothServerSocket listenUsingEncryptedRfcommOn(int port) throws IOException { - BluetoothServerSocket socket = - new BluetoothServerSocket(BluetoothSocket.TYPE_RFCOMM, false, true, port); - int errno = socket.mSocket.bindListen(); - if (port == SOCKET_CHANNEL_AUTO_STATIC_NO_SDP) { - socket.setChannel(socket.mSocket.getPort()); - } - if (errno < 0) { - //TODO(BT): Throw the same exception error code - // that the previous code was using. - //socket.mSocket.throwErrnoNative(errno); - throw new IOException("Error: " + errno); - } - return socket; - } - - /** - * Construct a SCO server socket. - * Call #accept to retrieve connections to this socket. - * - * @return A SCO BluetoothServerSocket - * @throws IOException On error, for example Bluetooth not available, or insufficient - * permissions. - * @hide - */ - public static BluetoothServerSocket listenUsingScoOn() throws IOException { - BluetoothServerSocket socket = - new BluetoothServerSocket(BluetoothSocket.TYPE_SCO, false, false, -1); - int errno = socket.mSocket.bindListen(); - if (errno < 0) { - //TODO(BT): Throw the same exception error code - // that the previous code was using. - //socket.mSocket.throwErrnoNative(errno); - } - return socket; - } - - /** * Construct an encrypted, authenticated, L2CAP server socket. * Call #accept to retrieve connections to this socket. * <p>To auto assign a port without creating a SDP record use |
