summaryrefslogtreecommitdiff
path: root/framework/api
diff options
context:
space:
mode:
author Bhakthavatsala Raghavendra <bhaktha@google.com> 2024-11-08 00:16:04 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-11-08 00:16:04 +0000
commit891fea7286c9e0ebe376e1554afcb288eed366eb (patch)
tree6d992fb78e7e5f814baddeae96479814023166d1 /framework/api
parent635ddf506f7799301aca728e4db554b1e2b54eda (diff)
parentaf3a017be782f21896c101264b31af55a5cf0314 (diff)
Merge "Add socket settings interface" into main
Diffstat (limited to 'framework/api')
-rw-r--r--framework/api/current.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/framework/api/current.txt b/framework/api/current.txt
index 4347504e24..6f27962380 100644
--- a/framework/api/current.txt
+++ b/framework/api/current.txt
@@ -52,6 +52,7 @@ package android.bluetooth {
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingInsecureRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException;
method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingL2capChannel() throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingRfcommWithServiceRecord(String, java.util.UUID) throws java.io.IOException;
+ method @FlaggedApi("com.android.bluetooth.flags.socket_settings_api") @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public android.bluetooth.BluetoothServerSocket listenUsingSocketSettings(@NonNull android.bluetooth.BluetoothSocketSettings) throws java.io.IOException;
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean setName(String);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean startDiscovery();
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public boolean startLeScan(android.bluetooth.BluetoothAdapter.LeScanCallback);
@@ -531,6 +532,7 @@ package android.bluetooth {
method public android.bluetooth.BluetoothSocket createInsecureRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
method @NonNull public android.bluetooth.BluetoothSocket createL2capChannel(int) throws java.io.IOException;
method public android.bluetooth.BluetoothSocket createRfcommSocketToServiceRecord(java.util.UUID) throws java.io.IOException;
+ method @FlaggedApi("com.android.bluetooth.flags.socket_settings_api") @NonNull public android.bluetooth.BluetoothSocket createUsingSocketSettings(@NonNull android.bluetooth.BluetoothSocketSettings) throws java.io.IOException;
method public int describeContents();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT) public boolean fetchUuidsWithSdp();
method public String getAddress();
@@ -1080,6 +1082,7 @@ package android.bluetooth {
method public android.bluetooth.BluetoothDevice getRemoteDevice();
method public boolean isConnected();
field public static final int TYPE_L2CAP = 3; // 0x3
+ field @FlaggedApi("com.android.bluetooth.flags.socket_settings_api") public static final int TYPE_LE = 4; // 0x4
field public static final int TYPE_RFCOMM = 1; // 0x1
field public static final int TYPE_SCO = 2; // 0x2
}
@@ -1112,6 +1115,26 @@ package android.bluetooth {
field public static final int UNSPECIFIED = 0; // 0x0
}
+ @FlaggedApi("com.android.bluetooth.flags.socket_settings_api") public final class BluetoothSocketSettings {
+ method @IntRange(from=128, to=255) public int getL2capPsm();
+ method @Nullable public String getRfcommServiceName();
+ method @Nullable public java.util.UUID getRfcommUuid();
+ method public int getSocketType();
+ method public boolean isAuthenticationRequired();
+ method public boolean isEncryptionRequired();
+ }
+
+ @FlaggedApi("com.android.bluetooth.flags.socket_settings_api") public static final class BluetoothSocketSettings.Builder {
+ ctor public BluetoothSocketSettings.Builder();
+ method @NonNull public android.bluetooth.BluetoothSocketSettings build();
+ method @NonNull public android.bluetooth.BluetoothSocketSettings.Builder setAuthenticationRequired(boolean);
+ method @NonNull public android.bluetooth.BluetoothSocketSettings.Builder setEncryptionRequired(boolean);
+ method @NonNull public android.bluetooth.BluetoothSocketSettings.Builder setL2capPsm(@IntRange(from=128, to=255) int);
+ method @NonNull public android.bluetooth.BluetoothSocketSettings.Builder setRfcommServiceName(@NonNull String);
+ method @NonNull public android.bluetooth.BluetoothSocketSettings.Builder setRfcommUuid(@NonNull java.util.UUID);
+ method @NonNull public android.bluetooth.BluetoothSocketSettings.Builder setSocketType(int);
+ }
+
public final class BluetoothStatusCodes {
field public static final int ERROR_BLUETOOTH_NOT_ALLOWED = 2; // 0x2
field public static final int ERROR_BLUETOOTH_NOT_ENABLED = 1; // 0x1