I have tried to find a way to disable the PatternLock screen temporarily. I don't want the lock to be disabled completely, but the user should not need to re-enter his pattern all the time.
My idea is to write a service which disables the pattern after some user activity and re-enables it after a while. (and even more)
There are apps on the market that do something like that (i.e. AutoLock or TogglePattern), so there must be a solution.
I know that I can prevent a lock completely by using:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
or
KeyguardLock.disableKeyguard()
But that is not what I'm after.
I saw the class com.android.internal.widget.LockPatternUtils
in the android sources which is used by the settings activity, but this class is not (at least as far as I know) accessible by a "normal" application.
Do you have any suggestions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…