Merge "Update BluetoothA2dp API" am: ae6583b34f am: e90bacbc0a am: 51beeda872

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1596413

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I234ca0e0c123293a56516e1ed461bfbd9f5b1481
This commit is contained in:
More Kuo
2021-02-24 02:14:06 +00:00
committed by Automerger Merge Worker
3 changed files with 7 additions and 6 deletions

View File

@@ -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;

View File

@@ -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);
}
}