android - Enable or disable the PatternLock screen from code -
I have tried temporarily to find a way to disable PatternLock screens I do not completely disable lock I want to, but the user should not need to re-enter his pattern all the time.
My idea is to write a service that disables the pattern after some user activity and enables it again after a few times. (And even more)
There are apps on the market that do something (i.e. autolog or toggle pattern), so there should be a solution.
I know that I can stop using a lock completely:
getWindow (). AddFlags (WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
or
KeyguardLock.disableKeyguard ()
but it is not That's what I am after.
I use
Do you have any suggestions?
Did you try to see the code com.android.internal.widget.LockPatternUtils
And what does this do?
Something like this:
Public Zero Sitelapper enabled (Boolean enabled) {Set Boolean (android.provider.Settings.System.LOCK_PATTERN_ENABLED, enabled); } Private zero set boolean (string system setting, boolean enabled) {android.provider.Settings.System.putInt (mContentResolver, system setting, enabled? 1: 0); }
You may be able to do something in your code.
Comments
Post a Comment