Freigeben über


DevicePolicyManager.ManagedProfileContactsAccessPolicy Property

Definition

Called by a profile owner of a managed profile to determine the current policy applied to managed profile contacts. -or- Called by a profile owner of a managed profile to set the packages that are allowed access to the managed profile contacts from the parent user.

public virtual Android.App.Admin.PackagePolicy? ManagedProfileContactsAccessPolicy { [Android.Runtime.Register("getManagedProfileContactsAccessPolicy", "()Landroid/app/admin/PackagePolicy;", "GetGetManagedProfileContactsAccessPolicyHandler", ApiSince=34)] get; [Android.Runtime.Register("setManagedProfileContactsAccessPolicy", "(Landroid/app/admin/PackagePolicy;)V", "GetSetManagedProfileContactsAccessPolicy_Landroid_app_admin_PackagePolicy_Handler", ApiSince=34)] set; }
[<get: Android.Runtime.Register("getManagedProfileContactsAccessPolicy", "()Landroid/app/admin/PackagePolicy;", "GetGetManagedProfileContactsAccessPolicyHandler", ApiSince=34)>]
[<set: Android.Runtime.Register("setManagedProfileContactsAccessPolicy", "(Landroid/app/admin/PackagePolicy;)V", "GetSetManagedProfileContactsAccessPolicy_Landroid_app_admin_PackagePolicy_Handler", ApiSince=34)>]
member this.ManagedProfileContactsAccessPolicy : Android.App.Admin.PackagePolicy with get, set

Property Value

the current contacts search policy

Attributes

Remarks

Property getter documentation:

Called by a profile owner of a managed profile to determine the current policy applied to managed profile contacts.

The calling device admin must be a profile owner of a managed profile. If it is not, a SecurityException will be thrown.

Java documentation for android.app.admin.DevicePolicyManager.getManagedProfileContactsAccessPolicy().

Property setter documentation:

Called by a profile owner of a managed profile to set the packages that are allowed access to the managed profile contacts from the parent user.

For example, the system will enforce the provided policy and determine if contacts in the managed profile are shown when queried by an application in the parent user.

The calling device admin must be a profile owner of a managed profile. If it is not, a SecurityException will be thrown.

A PackagePolicy#PACKAGE_POLICY_ALLOWLIST_AND_SYSTEM policy type allows access from the OEM default packages for the Sms, Dialer and Contact roles, in addition to the packages specified in PackagePolicy#getPackageNames()

Java documentation for android.app.admin.DevicePolicyManager.setManagedProfileContactsAccessPolicy(android.app.admin.PackagePolicy).

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