語言

DevicePolicyManager.SetKeyguardDisabled(ComponentName, Boolean) 方法

定義

由與該裝置相關的次要使用者的裝置擁有者或設定檔擁有者呼叫,要求完全停用 Keyguard。

[Android.Runtime.Register("setKeyguardDisabled", "(Landroid/content/ComponentName;Z)Z", "GetSetKeyguardDisabled_Landroid_content_ComponentName_ZHandler", ApiSince=23)]
public virtual bool SetKeyguardDisabled(Android.Content.ComponentName admin, bool disabled);
[<Android.Runtime.Register("setKeyguardDisabled", "(Landroid/content/ComponentName;Z)Z", "GetSetKeyguardDisabled_Landroid_content_ComponentName_ZHandler", ApiSince=23)>]
abstract member SetKeyguardDisabled : Android.Content.ComponentName * bool -> bool
override this.SetKeyguardDisabled : Android.Content.ComponentName * bool -> bool

參數

admin
ComponentName

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

disabled
Boolean

true 停用Keyguard,重新 false 啟用。

傳回

false 如果是在鎖密碼存在時嘗試停用鑰匙保護器。 否則為 true。

屬性

備註

由與該裝置相關的次要使用者的裝置擁有者或設定檔擁有者呼叫,要求完全停用 Keyguard。

將鑰匙保護設為停用,效果和選擇「無」鎖定螢幕類型是一樣的。 然而,若密碼、PIN 碼或模式已設定,此通話不會生效。 如果在鑰匙保護器被停用後設定了密碼、PIN 或模式,鑰匙保護器將停止被停用。

截至目前 android.os.Build.VERSION_CODES#P,若此通話顯示鑰匙護罩,也會關閉。

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

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

適用於