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

Commit 93ee8efe authored by Tim Peng's avatar Tim Peng
Browse files

BTHS will have no sound after disable HD audio

-setCodecConfigPreference() should not be called when disableOptionalCodecs() is called.
-disableOptionalCodecs() would set SBC codec automatically

Bug: 183456866
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=BluetoothCodecDialogPreferenceControllerTest
Change-Id: Ib18f4a683dcba7ba92df827c30da0088c90b4d72
parent de4494de
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -60,14 +60,6 @@ public class BluetoothCodecDialogPreferenceController extends
        ((BaseBluetoothDialogPreference) mPreference).setCallback(this);
    }

    @Override
    public void onHDAudioEnabled(boolean enabled) {
        if (!enabled) {
            // If option codec is disabled, SBC is the only only one available codec.
            onIndexUpdated(convertCfgToBtnIndex(BluetoothCodecConfig.SOURCE_CODEC_TYPE_SBC));
        }
    }

    @Override
    public List<Integer> getSelectableIndex() {
        List<Integer> index = new ArrayList<>();