Share via


DevicePolicyManager.SetRestrictionsProvider Method

Definition

Designates a specific service component as the provider for making permission requests of a local or remote administrator of the user.

[Android.Runtime.Register("setRestrictionsProvider", "(Landroid/content/ComponentName;Landroid/content/ComponentName;)V", "GetSetRestrictionsProvider_Landroid_content_ComponentName_Landroid_content_ComponentName_Handler")]
public virtual void SetRestrictionsProvider (Android.Content.ComponentName admin, Android.Content.ComponentName? provider);
[<Android.Runtime.Register("setRestrictionsProvider", "(Landroid/content/ComponentName;Landroid/content/ComponentName;)V", "GetSetRestrictionsProvider_Landroid_content_ComponentName_Landroid_content_ComponentName_Handler")>]
abstract member SetRestrictionsProvider : Android.Content.ComponentName * Android.Content.ComponentName -> unit
override this.SetRestrictionsProvider : Android.Content.ComponentName * Android.Content.ComponentName -> unit

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with.

provider
ComponentName

The component name of the service that implements RestrictionsReceiver. If this param is null, it removes the restrictions provider previously assigned.

Attributes

Remarks

Designates a specific service component as the provider for making permission requests of a local or remote administrator of the user. <p/> Only a device owner or profile owner can designate the restrictions provider.

Java documentation for android.app.admin.DevicePolicyManager.setRestrictionsProvider(android.content.ComponentName, android.content.ComponentName).

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.

Applies to