diff options
author | Zach Johnson <zachoverflow@google.com> | 2020-08-19 16:53:06 -0700 |
---|---|---|
committer | Zach Johnson <zachoverflow@google.com> | 2020-08-19 16:53:06 -0700 |
commit | ea321cd2e938a124f690c8a4a1b98e1e4b0c67a6 (patch) | |
tree | 549d8cc2e67b3574f23425956df3127e184b955b /framework/java/android/bluetooth/BluetoothAdapter.java | |
parent | d00dcad73277d4905de507b34f9b65fa5b1ced6c (diff) |
Remove listenUsingEncryptedRfcommOn & listenUsingScoOn
both are hidden and not @UnsupportedAppUsage, so are safe to remove
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I58acb4160207fc0eeaeb7875bfd61f3bd442ad9a
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 47bd207fee..4ee22b78c5 100644 --- a/framework/java/android/bluetooth/BluetoothAdapter.java +++ b/framework/java/android/bluetooth/BluetoothAdapter.java @@ -2563,52 +2563,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 |