summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothDevice.java
diff options
context:
space:
mode:
authorChen Chen <cncn@google.com>2022-01-25 14:20:17 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-01-25 14:20:17 +0000
commit579740b0269e63bbb21e22235f1f8e1c55afa0cc (patch)
tree445689514be94b87b30a0c3bc930f8aa24d456e1 /framework/java/android/bluetooth/BluetoothDevice.java
parentaa88322ed2417ce595853b65dc6d20e1f3711a1c (diff)
parentc27d82992a07dbf0d32822c08fe55569966379fa (diff)
SpatialAudio: Add API to switch buffer size am: a81d2c64bb am: ed2bc6fa00 am: c27d82992a
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1954936 Change-Id: Ia2eef5e86f6764624d92d6b2511b575320d31c2f
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothDevice.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java
index 4c138f87f8..89ec4b246f 100644
--- a/framework/java/android/bluetooth/BluetoothDevice.java
+++ b/framework/java/android/bluetooth/BluetoothDevice.java
@@ -232,6 +232,25 @@ public final class BluetoothDevice implements Parcelable, Attributable {
"android.bluetooth.device.action.BATTERY_LEVEL_CHANGED";
/**
+ * Broadcast Action: Indicates the audio buffer size should be switched
+ * between a low latency buffer size and a higher and larger latency buffer size.
+ * <p>Always contains the extra fields {@link #EXTRA_DEVICE} and {@link
+ * #EXTRA_LOW_LATENCY_BUFFER_SIZE}.
+ *
+ * @hide
+ */
+ @SuppressLint("ActionValue")
+ @RequiresBluetoothConnectPermission
+ @RequiresPermission(allOf = {
+ android.Manifest.permission.BLUETOOTH_CONNECT,
+ android.Manifest.permission.BLUETOOTH_PRIVILEGED,
+ })
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ @SystemApi
+ public static final String ACTION_SWITCH_BUFFER_SIZE =
+ "android.bluetooth.device.action.SWITCH_BUFFER_SIZE";
+
+ /**
* Used as an Integer extra field in {@link #ACTION_BATTERY_LEVEL_CHANGED}
* intent. It contains the most recently retrieved battery level information
* ranging from 0% to 100% for a remote device, {@link #BATTERY_LEVEL_UNKNOWN}
@@ -310,6 +329,17 @@ public final class BluetoothDevice implements Parcelable, Attributable {
*/
public static final String EXTRA_PREVIOUS_BOND_STATE =
"android.bluetooth.device.extra.PREVIOUS_BOND_STATE";
+
+ /**
+ * Used as a boolean extra field to indicate if audio buffer size is low latency or not
+ *
+ * @hide
+ */
+ @SuppressLint("ActionValue")
+ @SystemApi
+ public static final String EXTRA_LOW_LATENCY_BUFFER_SIZE =
+ "android.bluetooth.device.extra.LOW_LATENCY_BUFFER_SIZE";
+
/**
* Indicates the remote device is not bonded (paired).
* <p>There is no shared link key with the remote device, so communication