Update Opus over A2DP to use BluetoothCodecConfig api
Bug: 240635097 Test: sink device using bds-dev Change-Id: Idd0a0c8a63dc969acbb10a88df5218507017e475
This commit is contained in:
@@ -40,9 +40,8 @@ public abstract class AbstractBluetoothDialogPreferenceController extends
|
||||
|
||||
private static final String TAG = "AbstractBtDlgCtr";
|
||||
|
||||
private static final int SOURCE_CODEC_TYPE_OPUS = 6; // TODO(b/240635097): remove in U
|
||||
|
||||
protected static final int[] CODEC_TYPES = {SOURCE_CODEC_TYPE_OPUS,
|
||||
protected static final int[] CODEC_TYPES = {
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_OPUS,
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3,
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user