Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5b4c01f authored by Gurpreet Ghai's avatar Gurpreet Ghai Committed by Bruno Martins
Browse files

BT Settings: Adding aptX Adaptive codec entry in Settings

These changes are for entry and handling of aptX Adaptive
codec in Codec preference developer entry.

CRs-Fixed: 2280216

Change-Id: I8d44df688317809e9b7b754f7f5dcfaccd825bba
parent 05c95081
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ public class BluetoothAudioCodecPreferenceController extends
                    case 5:
                        codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC;
                        break;
                    case 6:
                        codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE;
                        break;
                    default:
                        break;
                }
@@ -107,13 +110,17 @@ public class BluetoothAudioCodecPreferenceController extends
                codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST;
                break;
            case 6:
                codecTypeValue = BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE;
                codecPriorityValue = BluetoothCodecConfig.CODEC_PRIORITY_HIGHEST;
                break;
            case 7:
                synchronized (mBluetoothA2dpConfigStore) {
                    if (mBluetoothA2dp != null) {
                        mBluetoothA2dp.enableOptionalCodecs(null); // Use current active device
                    }
                }
                return;
            case 7:
            case 8:
                synchronized (mBluetoothA2dpConfigStore) {
                    if (mBluetoothA2dp != null) {
                        mBluetoothA2dp.disableOptionalCodecs(null); // Use current active device
@@ -147,6 +154,9 @@ public class BluetoothAudioCodecPreferenceController extends
            case BluetoothCodecConfig.SOURCE_CODEC_TYPE_LDAC:
                index = 5;
                break;
            case BluetoothCodecConfig.SOURCE_CODEC_TYPE_APTX_ADAPTIVE:
                index = 6;
                break;
            case BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID:
            default:
                break;