Share via


DevicePolicyManager.GetTrustAgentConfiguration Method

Definition

Gets configuration for the given trust agent based on aggregating all calls to #setTrustAgentConfiguration(ComponentName, ComponentName, PersistableBundle) for all device admins.

[Android.Runtime.Register("getTrustAgentConfiguration", "(Landroid/content/ComponentName;Landroid/content/ComponentName;)Ljava/util/List;", "GetGetTrustAgentConfiguration_Landroid_content_ComponentName_Landroid_content_ComponentName_Handler", ApiSince=23)]
public virtual System.Collections.Generic.IList<Android.OS.PersistableBundle>? GetTrustAgentConfiguration (Android.Content.ComponentName? admin, Android.Content.ComponentName agent);
[<Android.Runtime.Register("getTrustAgentConfiguration", "(Landroid/content/ComponentName;Landroid/content/ComponentName;)Ljava/util/List;", "GetGetTrustAgentConfiguration_Landroid_content_ComponentName_Landroid_content_ComponentName_Handler", ApiSince=23)>]
abstract member GetTrustAgentConfiguration : Android.Content.ComponentName * Android.Content.ComponentName -> System.Collections.Generic.IList<Android.OS.PersistableBundle>
override this.GetTrustAgentConfiguration : Android.Content.ComponentName * Android.Content.ComponentName -> System.Collections.Generic.IList<Android.OS.PersistableBundle>

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with. If null, this function returns a list of configurations for all admins that declare #KEYGUARD_DISABLE_TRUST_AGENTS. If any admin declares #KEYGUARD_DISABLE_TRUST_AGENTS but doesn't call #setTrustAgentConfiguration(ComponentName, ComponentName, PersistableBundle) for this or calls it with a null configuration, null is returned.

agent
ComponentName

Which component to get enabled features for.

Returns

configuration for the given trust agent.

Attributes

Remarks

Gets configuration for the given trust agent based on aggregating all calls to #setTrustAgentConfiguration(ComponentName, ComponentName, PersistableBundle) for all device admins.

This method can be called on the DevicePolicyManager instance returned by #getParentProfileInstance(ComponentName) in order to retrieve the configuration set on the parent profile.

On devices not supporting PackageManager#FEATURE_SECURE_LOCK_SCREEN feature, null is always returned.

Java documentation for android.app.admin.DevicePolicyManager.getTrustAgentConfiguration(android.content.ComponentName, 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