Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09c4347c authored by Michael Groover's avatar Michael Groover Committed by Android (Google) Code Review
Browse files

Merge "Change device ID developer setting to disable option"

parents e3acc925 fcb6aff1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5857,9 +5857,9 @@
    <!-- Summary for whether to enable SMS access restriction [CHAR LIMIT=NONE]-->
    <string name="sms_access_restriction_enabled_summary">Only default phone and messaging apps have SMS &amp; call log permissions</string>
    <!-- Title for the new device identifier access restrictions [CHAR LIMIT=50]-->
    <string name="device_identifier_access_restrictions_title">Enable device identifier restrictions</string>
    <string name="device_identifier_access_restrictions_title">Disable device identifier restrictions</string>
    <!-- Summary for the new device identifier access restrictions [CHAR LIMIT=NONE]-->
    <string name="device_identifier_access_restrictions_summary">Enable the new access restrictions for device identifiers.</string>
    <string name="device_identifier_access_restrictions_summary">Disable the new access restrictions for device identifiers</string>
    <!-- Message when there are no available trust agents to display -->
+3 −3
Original line number Diff line number Diff line
@@ -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);
    }
}