Merge "Change device ID developer setting to disable option"

This commit is contained in:
Michael Groover
2019-02-07 00:03:59 +00:00
committed by Android (Google) Code Review
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);
}
}