DevicePolicyManager.SetCertInstallerPackage(ComponentName, 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.
Called by a profile owner or device owner to grant access to privileged certificate manipulation APIs to a third-party certificate installer app.
[Android.Runtime.Register("setCertInstallerPackage", "(Landroid/content/ComponentName;Ljava/lang/String;)V", "GetSetCertInstallerPackage_Landroid_content_ComponentName_Ljava_lang_String_Handler", ApiSince=23)]
public virtual void SetCertInstallerPackage (Android.Content.ComponentName admin, string? installerPackage);
[<Android.Runtime.Register("setCertInstallerPackage", "(Landroid/content/ComponentName;Ljava/lang/String;)V", "GetSetCertInstallerPackage_Landroid_content_ComponentName_Ljava_lang_String_Handler", ApiSince=23)>]
abstract member SetCertInstallerPackage : Android.Content.ComponentName * string -> unit
override this.SetCertInstallerPackage : Android.Content.ComponentName * string -> unit
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver
this request is associated with.
- installerPackage
- String
The package name of the certificate installer which will be given
access. If null
is given the current package will be cleared.
- Attributes
Remarks
Called by a profile owner or device owner to grant access to privileged certificate manipulation APIs to a third-party certificate installer app. Granted APIs include #getInstalledCaCerts
, #hasCaCertInstalled
, #installCaCert
, #uninstallCaCert
, #uninstallAllUserCaCerts
and #installKeyPair
.
Delegated certificate installer is a per-user state. The delegated access is persistent until it is later cleared by calling this method with a null value or uninstallling the certificate installer.
<b>Note:</b>Starting from android.os.Build.VERSION_CODES#N
, if the caller application's target SDK version is android.os.Build.VERSION_CODES#N
or newer, the supplied certificate installer package must be installed when calling this API, otherwise an IllegalArgumentException
will be thrown.
This member is deprecated. From android.os.Build.VERSION_CODES#O
. Use #setDelegatedScopes
with the #DELEGATION_CERT_INSTALL
scope instead.
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.