Merge "Set default value of A2DP HW offload toggle" into pi-dev am: d6acb081af

am: 6cc221169b

Change-Id: Ia6097eeec41c0d19b06ce01db136e208a4cb6ebb
This commit is contained in:
Petri Gynther
2018-05-24 23:46:01 -07:00
committed by android-build-merger

View File

@@ -69,8 +69,15 @@ public class BluetoothA2dpHwOffloadPreferenceController extends DeveloperOptions
@Override @Override
protected void onDeveloperOptionsSwitchDisabled() { protected void onDeveloperOptionsSwitchDisabled() {
super.onDeveloperOptionsSwitchDisabled(); super.onDeveloperOptionsSwitchDisabled();
((SwitchPreference) mPreference).setChecked(true); final boolean offloadSupported =
SystemProperties.set(A2DP_OFFLOAD_DISABLED_PROPERTY, "true"); SystemProperties.getBoolean(A2DP_OFFLOAD_SUPPORTED_PROPERTY, false);
if (offloadSupported) {
((SwitchPreference) mPreference).setChecked(false);
SystemProperties.set(A2DP_OFFLOAD_DISABLED_PROPERTY, "false");
} else {
((SwitchPreference) mPreference).setChecked(true);
SystemProperties.set(A2DP_OFFLOAD_DISABLED_PROPERTY, "true");
}
} }
public void onA2dpHwDialogConfirmed() { public void onA2dpHwDialogConfirmed() {