Update Opus over A2DP to use BluetoothCodecConfig api

Bug: 240635097
Test: sink device using bds-dev
Change-Id: Idd0a0c8a63dc969acbb10a88df5218507017e475
This commit is contained in:
Omer Osman
2022-08-25 00:12:30 +00:00
parent 5a1743ecba
commit dc7fdfa060
3 changed files with 12 additions and 17 deletions

View File

@@ -40,8 +40,6 @@ public class BluetoothCodecDialogPreferenceController extends
private static final String KEY = "bluetooth_audio_codec_settings";
private static final String TAG = "BtCodecCtr";
private static final int SOURCE_CODEC_TYPE_OPUS = 6; // TODO remove in U
private final Callback mCallback;
public BluetoothCodecDialogPreferenceController(Context context, Lifecycle lifecycle,
@@ -125,7 +123,7 @@ public class BluetoothCodecDialogPreferenceController extends
codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST;
break;
case 7:
codecTypeValue = SOURCE_CODEC_TYPE_OPUS; // TODO update in U
codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_OPUS;
codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST;
break;
default:
@@ -190,7 +188,7 @@ public class BluetoothCodecDialogPreferenceController extends
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC:
index = 5;
break;
case SOURCE_CODEC_TYPE_OPUS: // TODO update in U
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_OPUS:
index = 7;
break;
default: