Don't reset A2DP offload when disabling developer settings
* We need to disable A2DP HW offload on FP4 for now, however disabling developer settings would enable offload again and break SBC and AAC audio. Just remove this section and allow this setting to persist after disabling developer settings. Change-Id: I5b65b3887d68ac684d7ea78de0ee89fb7db9bb0f
This commit is contained in:
committed by
Michael Bestas
parent
5c7cd83ac5
commit
af730c7feb
@@ -80,23 +80,10 @@ public class BluetoothA2dpHwOffloadPreferenceController extends DeveloperOptions
|
||||
updateState(mPreference);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDeveloperOptionsSwitchDisabled() {
|
||||
super.onDeveloperOptionsSwitchDisabled();
|
||||
final boolean offloadSupported =
|
||||
SystemProperties.getBoolean(A2DP_OFFLOAD_SUPPORTED_PROPERTY, false);
|
||||
if (offloadSupported) {
|
||||
((TwoStatePreference) mPreference).setChecked(false);
|
||||
SystemProperties.set(A2DP_OFFLOAD_DISABLED_PROPERTY, "false");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isDefaultValue() {
|
||||
final boolean offloadSupported =
|
||||
SystemProperties.getBoolean(A2DP_OFFLOAD_SUPPORTED_PROPERTY, false);
|
||||
final boolean offloadDisabled =
|
||||
SystemProperties.getBoolean(A2DP_OFFLOAD_DISABLED_PROPERTY, false);
|
||||
return offloadSupported ? !offloadDisabled : true;
|
||||
// Always return true here to avoid needing to reboot when disabling
|
||||
// developer options, since we aren't turning this off when doing so anymore.
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user