Change device ID developer setting to disable option

Bug: 123646983
Test: Manually verified toggling the option set the expected value
Change-Id: Ia219c154d9572111c4fce1af4128a103ba0409ec
This commit is contained in:
Michael Groover
2019-02-06 14:09:13 -08:00
parent 9285d84aa4
commit fcb6aff14c
2 changed files with 5 additions and 5 deletions

View File

@@ -50,12 +50,12 @@ public class DeviceIdentifierAccessRestrictionsPreferenceController
private void writeSetting(boolean isEnabled) {
DeviceConfig.setProperty(DeviceConfig.Privacy.NAMESPACE,
DeviceConfig.Privacy.PROPERTY_DEVICE_IDENTIFIER_ACCESS_RESTRICTIONS_DISABLED,
String.valueOf(!isEnabled), false);
String.valueOf(isEnabled), false);
}
@Override
public void updateState(Preference preference) {
boolean isEnabled = !Boolean.parseBoolean(
boolean isEnabled = Boolean.parseBoolean(
DeviceConfig.getProperty(DeviceConfig.Privacy.NAMESPACE,
DeviceConfig.Privacy.PROPERTY_DEVICE_IDENTIFIER_ACCESS_RESTRICTIONS_DISABLED));
((SwitchPreference) mPreference).setChecked(isEnabled);
@@ -64,7 +64,7 @@ public class DeviceIdentifierAccessRestrictionsPreferenceController
@Override
protected void onDeveloperOptionsSwitchDisabled() {
super.onDeveloperOptionsSwitchDisabled();
writeSetting(true);
writeSetting(false);
((SwitchPreference) mPreference).setChecked(true);
}
}