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
This commit is contained in:
Tim Peng
2021-04-01 21:38:00 +08:00
parent de4494dea4
commit 93ee8efe94

View File

@@ -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<>();