aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Chataing <henrichataing@google.com>2023-10-31 18:11:01 +0000
committerHenri Chataing <henrichataing@google.com>2023-11-01 00:01:09 +0000
commit05cacb7bdb4e14d783e90efebdb709f8fc727a7a (patch)
tree20c7077f81eb6369a09a1567f80067d1e316e7d7
parent452a9e8d1a6af8cfe122a6a76038435efecebbe2 (diff)
downloadsl4a-05cacb7bdb4e14d783e90efebdb709f8fc727a7a.tar.gz
Update facade for BluetoothCodecConfig with BluetoothCodecType
Bug: 305734815 Test: TreeHugger Change-Id: I3bceb3a8d2fe8cff436124b08492dfcea566b30b
-rw-r--r--Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothA2dpFacade.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothA2dpFacade.java b/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothA2dpFacade.java
index 2c200d3e..e3304ffc 100644
--- a/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothA2dpFacade.java
+++ b/Common/src/com/googlecode/android_scripting/facade/bluetooth/BluetoothA2dpFacade.java
@@ -21,6 +21,7 @@ import android.bluetooth.BluetoothA2dp;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothCodecConfig;
import android.bluetooth.BluetoothCodecStatus;
+import android.bluetooth.BluetoothCodecType;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothUuid;
@@ -62,7 +63,7 @@ public class BluetoothA2dpFacade extends RpcReceiver {
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
mBluetoothA2dpReceiver = new BluetoothA2dpReceiver();
mBluetoothCodecConfig = new BluetoothCodecConfig(
- BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID,
+ null,
BluetoothCodecConfig.CODEC_PRIORITY_DEFAULT,
BluetoothCodecConfig.SAMPLE_RATE_NONE,
BluetoothCodecConfig.BITS_PER_SAMPLE_NONE,
@@ -258,7 +259,7 @@ public class BluetoothA2dpFacade extends RpcReceiver {
continue;
}
BluetoothCodecConfig codecConfig = new BluetoothCodecConfig(
- codecType,
+ BluetoothCodecType.createFromType(codecType),
BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST,
sampleRate,
bitsPerSample,