DevicePolicyManager.GetCrossProfileContactsSearchDisabled 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 of a managed profile to determine whether or not contacts search has been disabled.
[Android.Runtime.Register("getCrossProfileContactsSearchDisabled", "(Landroid/content/ComponentName;)Z", "GetGetCrossProfileContactsSearchDisabled_Landroid_content_ComponentName_Handler", ApiSince=24)]
public virtual bool GetCrossProfileContactsSearchDisabled(Android.Content.ComponentName admin);
[<Android.Runtime.Register("getCrossProfileContactsSearchDisabled", "(Landroid/content/ComponentName;)Z", "GetGetCrossProfileContactsSearchDisabled_Landroid_content_ComponentName_Handler", ApiSince=24)>]
abstract member GetCrossProfileContactsSearchDisabled : Android.Content.ComponentName -> bool
override this.GetCrossProfileContactsSearchDisabled : Android.Content.ComponentName -> bool
Parameters
- admin
- ComponentName
Which DeviceAdminReceiver this request is associated with.
Returns
The legacy contacts search disabled state if no access policy is set. On Android 14 (API 34) and later, if an access policy is set, returns true when the policy is not a blocklist, even if some packages are allowed; otherwise, returns false.
- Attributes
Remarks
Called by a profile owner of a managed profile to determine whether or not contacts search has been disabled.
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, this will return true when #setManagedProfileContactsAccessPolicy(PackagePolicy) has been set with a non-null policy whose policy type is NOT PackagePolicy#PACKAGE_POLICY_BLOCKLIST
This member is deprecated. From android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE use #getManagedProfileContactsAccessPolicy()
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.