How to detect key protection status in android

I have an application that requires detection of a previous key protection state before calling disableKeyguard() or reenableKeyguard() set by the user! is there any way to accomplish this task?

+4
source share
1 answer

From the documentation

Use

 ((KeyguardManager)getSystemService(Context.KEYGUARD_SERVICE)).isKeyguardLocked() 
+8
source

All Articles