Android判断当前是否处于屏幕锁定状态

KeyguardManager mKeyguardManager = (KeyguardManager)mContext.getSystemService(Context.KEYGUARD_SERVICE);   
if (mKeyguardManager.inKeyguardRestrictedInputMode()) {
//keyguard is on
...
}

你可能感兴趣的:(Android判断当前是否处于屏幕锁定状态)