public boolean isDeviceLocked ()
This method takes into account the current state of the Lockscreen user interface.
So, if a secure screen lock has been configured, it will conflict with isKeyguardSecure () return false if:
- User unlocked Lockscreen and uses device
- The Smart Lock function (Settings โ Security โ Intelligent Lock) allows you to unlock the device without additional authentication
public boolean isKeyguardSecure ()
This method does NOT take into account the current state of the Lockscreen user interface.
So, if a secure screen lock has been set, it will always return true , regardless of whether the Lockscreen was unlocked by the user or if Smart Lock allows you to unlock it without additional authentication.
I could not reproduce the behavior described by ByteHamster. By the way
Martin Nordholts May 05 '15 at 13:05 2015-05-05 13:05
source share