DevicePolicyManager.RemoveCrossProfileWidgetProvider 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.
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.
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
- <xref:Android.App.Admin.DevicePolicyManager.AddCrossProfileWidgetProvider(Android.Content.ComponentName%2c+System.String)>
- GetCrossProfileWidgetProviders(ComponentName)