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

Commit ee636e65 authored by ValdikSS's avatar ValdikSS Committed by Rashed Abdel-Tawab
Browse files

Allow SBC as HD audio codec in Bluetooth device configuration

Change-Id: I4d149e87e27e16d571f53d0521f12a8ab9d0fc94
parent a8794260
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -269,7 +269,7 @@ public class A2dpProfile implements LocalBluetoothProfile {

        final BluetoothCodecConfig codecConfig = (selectable == null || selectable.length < 1)
                ? null : selectable[0];
        final int codecType = (codecConfig == null || codecConfig.isMandatoryCodec())
        final int codecType = (codecConfig == null)
                ? BluetoothCodecConfig.SOURCE_CODEC_TYPE_INVALID : codecConfig.getCodecType();

        int index = -1;
+3 −1
Original line number Diff line number Diff line
@@ -183,7 +183,9 @@ public class A2dpProfileTest {
        when(status.getCodecsSelectableCapabilities()).thenReturn(configs);

        when(config.isMandatoryCodec()).thenReturn(true);
        assertThat(mProfile.getHighQualityAudioOptionLabel(mDevice)).isEqualTo(UNKNOWN_CODEC_LABEL);
        when(config.getCodecName()).thenReturn("SBC");
        assertThat(mProfile.getHighQualityAudioOptionLabel(mDevice)).isEqualTo(
                String.format(KNOWN_CODEC_LABEL, config.getCodecName()));
    }

    @Test