1

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();
         }
    }

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

4

0 回答 0