次の方法で共有


DevicePolicyManager.SetCrossProfileContactsSearchDisabled Method

Definition

Called by a profile owner of a managed profile to set whether contacts search from the managed profile will be shown in the parent profile, for incoming calls.

[Android.Runtime.Register("setCrossProfileContactsSearchDisabled", "(Landroid/content/ComponentName;Z)V", "GetSetCrossProfileContactsSearchDisabled_Landroid_content_ComponentName_ZHandler", ApiSince=24)]
public virtual void SetCrossProfileContactsSearchDisabled (Android.Content.ComponentName admin, bool disabled);
[<Android.Runtime.Register("setCrossProfileContactsSearchDisabled", "(Landroid/content/ComponentName;Z)V", "GetSetCrossProfileContactsSearchDisabled_Landroid_content_ComponentName_ZHandler", ApiSince=24)>]
abstract member SetCrossProfileContactsSearchDisabled : Android.Content.ComponentName * bool -> unit
override this.SetCrossProfileContactsSearchDisabled : Android.Content.ComponentName * bool -> unit

Parameters

admin
ComponentName

Which DeviceAdminReceiver this request is associated with.

disabled
Boolean

If true contacts search in the managed profile is not displayed.

Attributes

Remarks

Called by a profile owner of a managed profile to set whether contacts search from the managed profile will be shown in the parent profile, for incoming calls.

The calling device admin must be a profile owner. If it is not, a security exception will be thrown.

Starting with android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE, calling this function is similar to calling #setManagedProfileContactsAccessPolicy(PackagePolicy) with a PackagePolicy#PACKAGE_POLICY_BLOCKLIST policy type when disabled is false or a PackagePolicy#PACKAGE_POLICY_ALLOWLIST policy type when disabled is true.

This member is deprecated. From android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE use #setManagedProfileContactsAccessPolicy(PackagePolicy)

Java documentation for android.app.admin.DevicePolicyManager.setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean).

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