privateDnsMode property

String? privateDnsMode
getter/setter pair

The configuration mode for device's global private DNS settings.

If this is set to PRIVATE_DNS_SPECIFIED_HOST, then private_dns_host must be set.

Optional. Possible string values are:

  • "PRIVATE_DNS_MODE_UNSPECIFIED" : Unspecified. Defaults to PRIVATE_DNS_USER_CHOICE.
  • "PRIVATE_DNS_USER_CHOICE" : The user is allowed to configure private DNS.
  • "PRIVATE_DNS_AUTOMATIC" : Automatic private DNS mode. The device tries to use the network-provided DNS server over an encrypted connection before resorting to cleartext. The user is not allowed to modify this setting. Supported on Android 10 and above on fully managed devices and work profiles on company-owned devices. A NonComplianceDetail with MANAGEMENT_MODE is reported on other management modes. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 10. A NonComplianceDetail with INVALID_VALUE is reported if setting this fails for any other reason.Note: For work profiles on company-owned devices, setting this mode prevents the user from changing the setting, but the active private DNS setting is not modified. A NonComplianceDetail with MANAGEMENT_MODE is reported in this case.
  • "PRIVATE_DNS_SPECIFIED_HOST" : The device only uses the DNS server specified in private_dns_host. The user is not allowed to modify this setting. If this is set, then private_dns_host must be set. Supported on Android 10 and above on fully managed devices. A NonComplianceDetail with MANAGEMENT_MODE is reported on other management modes. A NonComplianceDetail with API_LEVEL is reported if the Android version is less than 10.

Implementation

core.String? privateDnsMode;