語言

DevicePolicyManager.SetCrossProfileContactsSearchDisabled 方法

定義

由受管理個人檔案的個人檔案擁有者呼叫,以設定從該受管理個人檔案搜尋的聯絡人是否會顯示在父個人檔案中,以回應來電。

[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

參數

admin
ComponentName

這個請求就是和這個 DeviceAdminReceiver 問題有關的。

disabled
Boolean

如果是真實聯絡人,則在管理的個人檔案中搜尋不會顯示。

屬性

備註

由受管理個人檔案的個人檔案擁有者呼叫,以設定從該受管理個人檔案搜尋的聯絡人是否會顯示在父個人檔案中,以回應來電。

通話裝置管理員必須是設定檔擁有者。 若不符合,則會拋出安全例外。

從 開始,android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE呼叫此函式類似於disabled在 為假時呼叫策略型別,或PackagePolicy#PACKAGE_POLICY_ALLOWLIST在為真時呼叫#setManagedProfileContactsAccessPolicy(PackagePolicy)PackagePolicy#PACKAGE_POLICY_BLOCKLIST策略型別disabled。

此會員已被棄用。 使用時期android.os.Build.VERSION_CODES#UPSIDE_DOWN_CAKE#setManagedProfileContactsAccessPolicy(PackagePolicy)

Java 文件 android.app.admin.DevicePolicyManager.setCrossProfileContactsSearchDisabled(android.content.ComponentName, boolean)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於