我正在使用keyguard manager
设置lock
和remove lock
,如下所示:
protected void enabledisablekeyguard(boolean keyguard)
{
KeyguardManager keyguardManager = (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
if(keyguard)
{
lock.reenableKeyguard();
lock=null;
}
else
{
lock.disableKeyguard();
}
}
成功禁用我的键盘后,它不会重新启用键盘锁