Don't set value when developer options disabled

We shouldn't change property when developer options disabled.
Change A2DP HW offload property without reboot, A2DP will not work.

Bug: 109717129
Test: manual
Change-Id: I96103b04922b28995be198badbed324de40624f0
This commit is contained in:
Chienyuan
2018-10-03 21:04:19 +08:00
parent ec65174f11
commit 84f2ee6eff

View File

@@ -66,20 +66,6 @@ public class BluetoothA2dpHwOffloadPreferenceController extends DeveloperOptions
}
}
@Override
protected void onDeveloperOptionsSwitchDisabled() {
super.onDeveloperOptionsSwitchDisabled();
final boolean offloadSupported =
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() {
final boolean offloadDisabled =
SystemProperties.getBoolean(A2DP_OFFLOAD_DISABLED_PROPERTY, false);