framework: Fix errorprone warnings
Some are suppressed with a TODO to be addressed later
Bug: 314402244
Test: m framework-bluetooth
Flag: EXEMPT, no-op
Change-Id: I32bf8e457dd17f0a5b11178e7535cecc3c625bf8
diff --git a/framework/java/android/bluetooth/BluetoothServerSocket.java b/framework/java/android/bluetooth/BluetoothServerSocket.java
index d3db9e4..540df73 100644
--- a/framework/java/android/bluetooth/BluetoothServerSocket.java
+++ b/framework/java/android/bluetooth/BluetoothServerSocket.java
@@ -73,7 +73,7 @@
* <p>For more information about using Bluetooth, read the <a
* href="{@docRoot}guide/topics/connectivity/bluetooth.html">Bluetooth</a> developer guide. </div>
*
- * <p>{@see BluetoothSocket}
+ * @see BluetoothSocket
*/
@SuppressLint("AndroidFrameworkBluetoothPermission")
public final class BluetoothServerSocket implements Closeable {
@@ -109,7 +109,7 @@
mSocketCreationTimeMillis = System.currentTimeMillis();
mType = type;
mChannel = port;
- mSocket = new BluetoothSocket(type, -1, auth, encrypt, null, port, null);
+ mSocket = new BluetoothSocket(type, auth, encrypt, null, port, null);
if (port == BluetoothAdapter.SOCKET_CHANNEL_AUTO_STATIC_NO_SDP) {
mSocket.setExcludeSdp(true);
}
@@ -133,8 +133,7 @@
mSocketCreationTimeMillis = System.currentTimeMillis();
mType = type;
mChannel = port;
- mSocket =
- new BluetoothSocket(type, -1, auth, encrypt, null, port, null, mitm, min16DigitPin);
+ mSocket = new BluetoothSocket(type, auth, encrypt, null, port, null, mitm, min16DigitPin);
if (port == BluetoothAdapter.SOCKET_CHANNEL_AUTO_STATIC_NO_SDP) {
mSocket.setExcludeSdp(true);
}
@@ -154,7 +153,7 @@
throws IOException {
mSocketCreationTimeMillis = System.currentTimeMillis();
mType = type;
- mSocket = new BluetoothSocket(type, -1, auth, encrypt, null, -1, uuid);
+ mSocket = new BluetoothSocket(type, auth, encrypt, null, -1, uuid);
// TODO: This is the same as mChannel = -1 - is this intentional?
mChannel = mSocket.getPort();
mSocketCreationLatencyMillis = System.currentTimeMillis() - mSocketCreationTimeMillis;