Freigeben über


DevicePolicyManager.ClearProfileOwner(ComponentName) Method

Definition

Clears the active profile owner.

[Android.Runtime.Register("clearProfileOwner", "(Landroid/content/ComponentName;)V", "GetClearProfileOwner_Landroid_content_ComponentName_Handler", ApiSince=24)]
public virtual void ClearProfileOwner (Android.Content.ComponentName admin);
[<Android.Runtime.Register("clearProfileOwner", "(Landroid/content/ComponentName;)V", "GetClearProfileOwner_Landroid_content_ComponentName_Handler", ApiSince=24)>]
abstract member ClearProfileOwner : Android.Content.ComponentName -> unit
override this.ClearProfileOwner : Android.Content.ComponentName -> unit

Parameters

admin
ComponentName

The component to remove as the profile owner.

Attributes

Remarks

Clears the active profile owner. The caller must be the profile owner of this user, otherwise a SecurityException will be thrown. This method is not available to managed profile owners.

While some policies previously set by the profile owner will be cleared by this method, it is a best-effort process and some other policies will still remain in place after the profile owner is cleared.

This member is deprecated. This method is expected to be used for testing purposes only. The profile owner will lose control of the user and its data after calling it. In order to protect any sensitive data that remains on this user, it is advised that the profile owner deletes it instead of calling this method. See #wipeData(int).

Java documentation for android.app.admin.DevicePolicyManager.clearProfileOwner(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