T
T
TrueGraf2013-04-23 17:12:53
Android
TrueGraf, 2013-04-23 17:12:53

How to understand if the device is locked by any type of lock (pattern password, PIN, password, face control)?

How to understand if the device is locked by any type of lock (graphic password, PIN, text password, face control)?
PS

android.provider.Settings.Secure.getInt(
          context.getContentResolver(),
          Settings.Secure.LOCK_PATTERN_ENABLED, 0) == 1

determines only whether the device is locked with a graphical password.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mrHobbY, 2013-04-23
@mrHobbY

KeyguardManager myKM = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE);
if( myKM.inKeyguardRestrictedInputMode()) {
 //it is locked
} else {
 //it is not locked
}

upd: ref

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question