summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Zach Johnson <zachoverflow@google.com> 2020-08-20 03:45:02 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2020-08-20 03:45:02 +0000
commit1d7b632b7a484d19cbad5d9af6b8290c856cd7a1 (patch)
treeb93c8c24437fdf2e5f0f26feaa74196a62322d88
parent2c4282de92267c41ace25f7403c45b20699e2894 (diff)
parent99666c457260b9e7ba42b67b2d6df061ad177860 (diff)
Merge "Remove listenUsingEncryptedRfcommOn & listenUsingScoOn" am: 22399aae26 am: e32671c74d am: dc08329ee9 am: 8f73278804 am: 99666c4572
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404838 Change-Id: I20e64adddf20667dc2abbfd5582a8cb34e3f0285
-rw-r--r--core/java/android/bluetooth/BluetoothAdapter.java46
1 files changed, 0 insertions, 46 deletions
diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java
index d2a774bcb168..c7b20b2a1dc3 100644
--- a/core/java/android/bluetooth/BluetoothAdapter.java
+++ b/core/java/android/bluetooth/BluetoothAdapter.java
@@ -2674,52 +2674,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