summaryrefslogtreecommitdiff
path: root/framework/java/android
diff options
context:
space:
mode:
authorMore Kuo <morekuo@google.com>2021-02-19 18:00:41 +0800
committerMore Kuo <morekuo@google.com>2021-02-19 18:29:00 +0800
commitdce3ab070dda29fcde4fe2614bafe1e5e145b34c (patch)
treefc0a17a0c90df28382f8c62b6a179fd345e8d351 /framework/java/android
parent812c75d373d1de294fb7cbcc8ecfe8c2c513acc6 (diff)
Update BluetoothA2dp API
- Rename setBufferMillis to setBufferLengthMillis - Rename getCodec to forCodec Bug: 179814567 Test: Build Change-Id: Iadb1b9e2b42ecab98f70b8bf6500e7a97aaf0aab
Diffstat (limited to 'framework/java/android')
-rw-r--r--framework/java/android/bluetooth/BluetoothA2dp.java7
-rw-r--r--framework/java/android/bluetooth/BufferConstraints.java2
2 files changed, 5 insertions, 4 deletions
diff --git a/framework/java/android/bluetooth/BluetoothA2dp.java b/framework/java/android/bluetooth/BluetoothA2dp.java
index cd91aa9b16..53aaae0470 100644
--- a/framework/java/android/bluetooth/BluetoothA2dp.java
+++ b/framework/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/framework/java/android/bluetooth/BufferConstraints.java b/framework/java/android/bluetooth/BufferConstraints.java
index 7e5ec1e784..97d97232b7 100644
--- a/framework/java/android/bluetooth/BufferConstraints.java
+++ b/framework/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);
}
}