DevicePolicyManager.ClearDeviceOwnerApp(String) 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.
Clears the current device owner.
[Android.Runtime.Register("clearDeviceOwnerApp", "(Ljava/lang/String;)V", "GetClearDeviceOwnerApp_Ljava_lang_String_Handler")]
public virtual void ClearDeviceOwnerApp (string? packageName);
[<Android.Runtime.Register("clearDeviceOwnerApp", "(Ljava/lang/String;)V", "GetClearDeviceOwnerApp_Ljava_lang_String_Handler")>]
abstract member ClearDeviceOwnerApp : string -> unit
override this.ClearDeviceOwnerApp : string -> unit
Parameters
- packageName
- String
The package name of the device owner.
- Attributes
Remarks
Clears the current device owner. The caller must be the device owner. This function should be used cautiously as once it is called it cannot be undone. The device owner can only be set as a part of device setup, before it completes.
While some policies previously set by the device owner will be cleared by this method, it is a best-effort process and some other policies will still remain in place after the device owner is cleared.
This member is deprecated. This method is expected to be used for testing purposes only. The device owner will lose control of the device and its data after calling it. In order to protect any sensitive data that remains on the device, it is advised that the device owner factory resets the device instead of calling this method. See #wipeData(int)
.
Java documentation for android.app.admin.DevicePolicyManager.clearDeviceOwnerApp(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.