键盘管理员设置锁定并删除锁定

时间:2016-05-02 07:23:09

标签: android keyguard

我正在使用keyguard manager设置lockremove 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();
         }
    }

成功禁用我的键盘后,它不会重新启用键盘锁

0 个答案:

没有答案