From b0be3e668278c267dcd24be8d692a795a6bbd1bb Mon Sep 17 00:00:00 2001 From: Erik Kline Date: Mon, 30 Oct 2017 15:29:44 +0900 Subject: [PATCH] Replace dns_tls with private_dns_mode setting Also includes: - SettingsLib strings used in PrivateDnsModeDialogPreference interaction in the Settings app - rename ContentResolver "resolver" in methods working with DNS resolvers (too confusing) Test: as follows - built - flashed - booted - runtest frameworks-net - no new failures in SettingsBackupTest nor in SettingsProviderTest - manual interaction with developer option works Bug: 34953048 Bug: 64133961 Change-Id: Ia7502916db9ffa0792e1e500a35e34d06a88e79d --- .../java/android/net/ConnectivityManager.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java index 0ccebc1c7a..6bf14257c7 100644 --- a/core/java/android/net/ConnectivityManager.java +++ b/core/java/android/net/ConnectivityManager.java @@ -619,6 +619,35 @@ public class ConnectivityManager { */ public static final int NETID_UNSET = 0; + /** + * Private DNS Mode values. + * + * The "private_dns_mode" global setting stores a String value which is + * expected to be one of the following. + */ + + /** + * @hide + */ + public static final String PRIVATE_DNS_MODE_OFF = "off"; + /** + * @hide + */ + public static final String PRIVATE_DNS_MODE_OPPORTUNISTIC = "opportunistic"; + /** + * @hide + */ + public static final String PRIVATE_DNS_MODE_PROVIDER_HOSTNAME = "hostname"; + /** + * The default Private DNS mode. + * + * This may change from release to release or may become dependent upon + * the capabilities of the underlying platform. + * + * @hide + */ + public static final String PRIVATE_DNS_DEFAULT_MODE = PRIVATE_DNS_MODE_OPPORTUNISTIC; + private final IConnectivityManager mService; /** * A kludge to facilitate static access where a Context pointer isn't available, like in the