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

Commit 4a906c16 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Add a global setting to disable DNS over TLS"

parents 9f8ed650 bccbd009
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -9016,6 +9016,13 @@ public final class Settings {
         */
        public static final String DEFAULT_DNS_SERVER = "default_dns_server";

        /**
         * Whether to disable DNS over TLS (boolean)
         *
         * @hide
         */
        public static final String DNS_TLS_DISABLED = "dns_tls_disabled";

        /** {@hide} */
        public static final String
                BLUETOOTH_HEADSET_PRIORITY_PREFIX = "bluetooth_headset_priority_";
+7 −3
Original line number Diff line number Diff line
@@ -17,9 +17,11 @@
package android.provider;

import static com.google.android.collect.Sets.newHashSet;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.is;

import static java.lang.reflect.Modifier.isFinal;
import static java.lang.reflect.Modifier.isPublic;
import static java.lang.reflect.Modifier.isStatic;
@@ -28,14 +30,15 @@ import android.platform.test.annotations.Presubmit;
import android.support.test.filters.SmallTest;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import java.lang.reflect.Field;
import java.util.HashSet;
import java.util.Set;

import org.junit.Test;
import org.junit.runner.RunWith;

/** Tests that ensure appropriate settings are backed up. */
@Presubmit
@RunWith(AndroidJUnit4.class)
@SmallTest
public class SettingsBackupTest {
@@ -175,6 +178,7 @@ public class SettingsBackupTest {
                    Settings.Global.DNS_RESOLVER_MIN_SAMPLES,
                    Settings.Global.DNS_RESOLVER_SAMPLE_VALIDITY_SECONDS,
                    Settings.Global.DNS_RESOLVER_SUCCESS_THRESHOLD_PERCENT,
                    Settings.Global.DNS_TLS_DISABLED,
                    Settings.Global.DOCK_SOUNDS_ENABLED_WHEN_ACCESSIBILITY,
                    Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE,
                    Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE,
+6 −0
Original line number Diff line number Diff line
@@ -473,6 +473,12 @@
    <!-- [CHAR LIMIT=NONE] Label for displaying Bluetooth Audio Codec Parameters while streaming -->
    <string name="bluetooth_select_a2dp_codec_streaming_label">Streaming: <xliff:g id="streaming_parameter">%1$s</xliff:g></string>

    <!-- Title of the developer option for DNS over TLS. -->
    <string name="dns_tls">DNS over TLS</string>
    <!-- Summary to explain the developer option for DNS over TLS.  This allows the user to
    request that the system attempt TLS with all DNS servers, or none. -->
    <string name="dns_tls_summary">If enabled, attempt DNS over TLS on port 853.</string>

    <!-- setting Checkbox summary whether to show options for wireless display certification  -->
    <string name="wifi_display_certification_summary">Show options for wireless display certification</string>
    <!-- Setting Checkbox summary whether to enable Wifi verbose Logging [CHAR LIMIT=80] -->
+2 −1
Original line number Diff line number Diff line
@@ -1980,7 +1980,8 @@ public class NetworkManagementService extends INetworkManagementService.Stub

        final String[] domainStrs = domains == null ? new String[0] : domains.split(" ");
        final int[] params = { sampleValidity, successThreshold, minSamples, maxSamples };
        final boolean useTls = false;
        final boolean useTls = Settings.Global.getInt(resolver,
                Settings.Global.DNS_TLS_DISABLED, 0) == 0;
        final String tlsHostname = "";
        final String[] tlsFingerprints = new String[0];
        try {