Merge "Set default value of A2DP HW offload toggle" into pi-dev
am: d6acb081af
Change-Id: I2b39c0b17613fafd88954505bf1d982dcc55014b
This commit is contained in:
@@ -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() {
|
||||||
|
Reference in New Issue
Block a user