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
This commit is contained in:
Erik Kline
2017-10-30 15:29:44 +09:00
parent addecd1491
commit b0be3e6682

View File

@@ -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