Merge "Add support for selection of Opus in Developer Options" into tm-qpr-dev
This commit is contained in:
@@ -40,7 +40,11 @@ public abstract class AbstractBluetoothDialogPreferenceController extends
|
||||
|
||||
private static final String TAG = "AbstractBtDlgCtr";
|
||||
|
||||
protected static final int[] CODEC_TYPES = {BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
|
||||
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,
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3,
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC,
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_HD,
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX,
|
||||
BluetoothCodecConfig.SOURCE_CODEC_TYPE_AAC,
|
||||
|
@@ -61,6 +61,8 @@ public class BluetoothCodecDialogPreference extends BaseBluetoothDialogPreferenc
|
||||
mRadioButtonIds.add(R.id.bluetooth_audio_codec_aptx);
|
||||
mRadioButtonIds.add(R.id.bluetooth_audio_codec_aptx_hd);
|
||||
mRadioButtonIds.add(R.id.bluetooth_audio_codec_ldac);
|
||||
mRadioButtonIds.add(R.id.bluetooth_audio_codec_lc3);
|
||||
mRadioButtonIds.add(R.id.bluetooth_audio_codec_opus);
|
||||
String[] stringArray = context.getResources().getStringArray(
|
||||
R.array.bluetooth_a2dp_codec_titles);
|
||||
for (int i = 0; i < stringArray.length; i++) {
|
||||
|
@@ -40,6 +40,8 @@ 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,
|
||||
@@ -118,6 +120,14 @@ public class BluetoothCodecDialogPreferenceController extends
|
||||
codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC;
|
||||
codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST;
|
||||
break;
|
||||
case 6:
|
||||
codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_LC3;
|
||||
codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST;
|
||||
break;
|
||||
case 7:
|
||||
codecTypeValue = SOURCE_CODEC_TYPE_OPUS; // TODO update in U
|
||||
codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -180,6 +190,9 @@ public class BluetoothCodecDialogPreferenceController extends
|
||||
case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC:
|
||||
index = 5;
|
||||
break;
|
||||
case SOURCE_CODEC_TYPE_OPUS: // TODO update in U
|
||||
index = 7;
|
||||
break;
|
||||
default:
|
||||
Log.e(TAG, "Unsupported config:" + config);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user