I tried to find a way to temporarily turn off the PatternLock screen. I do not want the lock to be completely disabled, but the user does not need to re-enter his template all the time.
My idea is to write a service that disables the template after some user actions and reactivates it after some time. (and even more)
There are applications on the market that do something like this (i.e. AutoLock or TogglePattern), so there should be a solution.
I know that I can completely lock the lock using:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
or
KeyguardLock.disableKeyguard()
But that is not what I need.
I saw the class com.android.internal.widget.LockPatternUtils in android sources, which is used by the settings activity, but this class is not (at least as far as I know) an accessible "normal" application.
Do you have any suggestions?
source share