Udostępnij za pośrednictwem


DevicePolicyManager.RemoveCrossProfileWidgetProvider Method

Definition

Called by the profile owner of a managed profile or a holder of the permission android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION to disable widget providers from a given package to be available in the parent profile.

[Android.Runtime.Register("removeCrossProfileWidgetProvider", "(Landroid/content/ComponentName;Ljava/lang/String;)Z", "GetRemoveCrossProfileWidgetProvider_Landroid_content_ComponentName_Ljava_lang_String_Handler")]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_PROFILE_INTERACTION")]
public virtual bool RemoveCrossProfileWidgetProvider (Android.Content.ComponentName? admin, string? packageName);
[<Android.Runtime.Register("removeCrossProfileWidgetProvider", "(Landroid/content/ComponentName;Ljava/lang/String;)Z", "GetRemoveCrossProfileWidgetProvider_Landroid_content_ComponentName_Ljava_lang_String_Handler")>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_PROFILE_INTERACTION")>]
abstract member RemoveCrossProfileWidgetProvider : Android.Content.ComponentName * string -> bool
override this.RemoveCrossProfileWidgetProvider : Android.Content.ComponentName * string -> bool

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with. Null if the caller is not a device admin.

packageName
String

The package from which widget providers are no longer allowlisted.

Returns

Whether the package was removed.

Attributes

Remarks

Called by the profile owner of a managed profile or a holder of the permission android.Manifest.permission#MANAGE_DEVICE_POLICY_PROFILE_INTERACTION to disable widget providers from a given package to be available in the parent profile. For this method to take effect the package should have been added via #addCrossProfileWidgetProvider( android.content.ComponentName, String).

<strong>Note:</strong> By default no widget provider package is allowlisted.

Java documentation for android.app.admin.DevicePolicyManager.removeCrossProfileWidgetProvider(android.content.ComponentName, java.lang.String).

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

See also