DevicePolicyManager.SetGlobalPrivateDnsModeOpportunistic Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the global Private DNS mode to opportunistic.
[Android.Runtime.Register("setGlobalPrivateDnsModeOpportunistic", "(Landroid/content/ComponentName;)I", "GetSetGlobalPrivateDnsModeOpportunistic_Landroid_content_ComponentName_Handler", ApiSince=29)]
public virtual Android.App.Admin.PrivateDnsSet SetGlobalPrivateDnsModeOpportunistic (Android.Content.ComponentName admin);
[<Android.Runtime.Register("setGlobalPrivateDnsModeOpportunistic", "(Landroid/content/ComponentName;)I", "GetSetGlobalPrivateDnsModeOpportunistic_Landroid_content_ComponentName_Handler", ApiSince=29)>]
abstract member SetGlobalPrivateDnsModeOpportunistic : Android.Content.ComponentName -> Android.App.Admin.PrivateDnsSet
override this.SetGlobalPrivateDnsModeOpportunistic : Android.Content.ComponentName -> Android.App.Admin.PrivateDnsSet
Parameters
- admin
- ComponentName
which DeviceAdminReceiver
this request is associated with.
Returns
PRIVATE_DNS_SET_NO_ERROR
if the mode was set successfully, or
PRIVATE_DNS_SET_ERROR_FAILURE_SETTING
if it could not be set.
- Attributes
Remarks
Sets the global Private DNS mode to opportunistic. May only be called by the device owner.
In this mode, the DNS subsystem will attempt a TLS handshake to the network-supplied resolver prior to attempting name resolution in cleartext.
Note: The device owner won't be able to set the global private DNS mode if there are unaffiliated secondary users or profiles on the device. It's recommended that affiliation ids are set for new users as soon as possible after provisioning via #setAffiliationIds
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.