summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author More Kuo <morekuo@google.com> 2021-02-24 00:39:44 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2021-02-24 00:39:44 +0000
commite90bacbc0ac9d8751158708c03addb036160865c (patch)
treeea61fa64d728281afb84afb8863c01c3b13730a4
parent0de60cd4e8c2899766567eafa93c6aaa19eb5aec (diff)
parentae6583b34f2ed0dce49ab5784940093ecd3b3c86 (diff)
Merge "Update BluetoothA2dp API" am: ae6583b34f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596413 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1fc9c4dad0013ecd62788417054f872f29dc775f
-rw-r--r--core/api/system-current.txt4
-rw-r--r--core/java/android/bluetooth/BluetoothA2dp.java7
-rw-r--r--core/java/android/bluetooth/BufferConstraints.java2
3 files changed, 7 insertions, 6 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index 7f0578aec671..4e7fc292f321 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -1431,7 +1431,7 @@ package android.bluetooth {
method @Nullable @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public android.bluetooth.BufferConstraints getBufferConstraints();
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getDynamicBufferSupport();
- method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setBufferMillis(int, int);
+ method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setBufferLengthMillis(int, int);
method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int);
field public static final int DYNAMIC_BUFFER_SUPPORT_A2DP_OFFLOAD = 1; // 0x1
field public static final int DYNAMIC_BUFFER_SUPPORT_A2DP_SOFTWARE_ENCODING = 2; // 0x2
@@ -1636,7 +1636,7 @@ package android.bluetooth {
public final class BufferConstraints implements android.os.Parcelable {
ctor public BufferConstraints(@NonNull java.util.List<android.bluetooth.BufferConstraint>);
method public int describeContents();
- method @Nullable public android.bluetooth.BufferConstraint getCodec(int);
+ method @Nullable public android.bluetooth.BufferConstraint forCodec(int);
method public void writeToParcel(@NonNull android.os.Parcel, int);
field public static final int BUFFER_CODEC_MAX_NUM = 32; // 0x20
field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.BufferConstraints> CREATOR;
diff --git a/core/java/android/bluetooth/BluetoothA2dp.java b/core/java/android/bluetooth/BluetoothA2dp.java
index cd91aa9b16b7..53aaae0470e2 100644
--- a/core/java/android/bluetooth/BluetoothA2dp.java
+++ b/core/java/android/bluetooth/BluetoothA2dp.java
@@ -943,12 +943,13 @@ public final class BluetoothA2dp implements BluetoothProfile {
*/
@SystemApi
@RequiresPermission(Manifest.permission.BLUETOOTH_PRIVILEGED)
- public boolean setBufferMillis(@BluetoothCodecConfig.SourceCodecType int codec, int value) {
- if (VDBG) log("setBufferMillis(" + codec + ", " + value + ")");
+ public boolean setBufferLengthMillis(@BluetoothCodecConfig.SourceCodecType int codec,
+ int value) {
+ if (VDBG) log("setBufferLengthMillis(" + codec + ", " + value + ")");
try {
final IBluetoothA2dp service = getService();
if (service != null && isEnabled()) {
- return service.setBufferMillis(codec, value);
+ return service.setBufferLengthMillis(codec, value);
}
if (service == null) Log.w(TAG, "Proxy not attached to service");
return false;
diff --git a/core/java/android/bluetooth/BufferConstraints.java b/core/java/android/bluetooth/BufferConstraints.java
index 7e5ec1e78435..97d97232b7a6 100644
--- a/core/java/android/bluetooth/BufferConstraints.java
+++ b/core/java/android/bluetooth/BufferConstraints.java
@@ -90,7 +90,7 @@ public final class BufferConstraints implements Parcelable {
* @hide
*/
@SystemApi
- public @Nullable BufferConstraint getCodec(@BluetoothCodecConfig.SourceCodecType int codec) {
+ public @Nullable BufferConstraint forCodec(@BluetoothCodecConfig.SourceCodecType int codec) {
return mBufferConstraints.get(codec);
}
}