diff options
author | Chen Chen <cncn@google.com> | 2022-01-25 13:45:00 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-01-25 13:45:00 +0000 |
commit | ed2bc6fa008e2617e0644428293429f113583212 (patch) | |
tree | 29cb982b9c4db349f62f1533987924d18ca916d5 /framework/java/android/bluetooth/BluetoothDevice.java | |
parent | 73c9ebec84913d8f1fbf115d7f5f23b4204d7a45 (diff) | |
parent | a81d2c64bbf3fa6e318538152d277423fe3aa506 (diff) |
SpatialAudio: Add API to switch buffer size am: a81d2c64bb
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1954936
Change-Id: Id4e979c4f018ab6fed12359d6e8a7711e1029a6d
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothDevice.java | 30 |
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 |