Two scenarios:

  1. I'm at a "trusted" place, and don't want to enter unlock password/pattern all the time
  2. I'm at an "untrusted" place and want my phone to be password/pattern screen locked

is there any way to use some kind of a shortcut/app which would quickly switch the way the screen gets locked? for example (when my screen is unlocked) - I press an icon and the lock type changes from using just a regular unlock method to password/pattern unlock method and vice versa.

using android2.2

edit: added a new answer below on what I now use to accomplish this (using android2.3.7)

thank you

  • I've been looking for this too. In my ideal world, you could set the lock screen to have two sliders. 1. normal one at the bottom (I know some UIs are different) and 2. another invisible one at the top. When you slide to unlock with the bottom one the it prompts you to enter a pin number. You, the phones owner, would be the only one aware of the top slider so you'd have unincumbered access to the phone by sliding the invisible slide. This would be the scenerio I'd run in the "Trusted" place, just in case I forget to toggle it before going to an "untrusted" place.
    – Matt
    Commented Jan 21, 2011 at 17:57
  • the flaw with your approach is - if it were an app for the masses, everyone would try to 'find' your invisible slider. I have an idea of having a normal slider + additional slider that would lock the screen with pass/pattern.. so it would be a very easy way to add additional security... I think it would be very convenient. hope I explained this good enough hehe :D
    – tkit
    Commented Jan 21, 2011 at 18:01
  • I know, but that's why that would be only for the "Trusted" locations as an extra level of security.
    – Matt
    Commented Jan 21, 2011 at 18:12

5 Answers 5


From what I've read, Tasker should be able to do this. You can turn on or off the screen lock mechanism based upon whatever criteria you want, including the value of a variable. You can also change the value of a variable via a widget. Combine the two and it should work.

Caveat Lector: I've researched Tasker, I've read about what it can and can't do, but I've never tried it (yet). So take this as speculation.

  • I'll try it and leave a comment here. thank you!
    – tkit
    Commented Jan 22, 2011 at 15:40
  • 1
    I downloaded Tasker yesterday -- yes, this can be done. tasker.wikidot.com/keyguardtog Commented Jan 23, 2011 at 16:48
  • Can you explain how you did it ?
    – Jack'
    Commented Nov 4, 2019 at 15:25

I am fairly certain this can't be done under 2.2. Even if you backup the lockscreen data, do a factory reset, and restore the data, only the lockscreen "type" is restored and not the actual pattern or password. It's designed not to be altered except by the Settings app.

  • 1
    Have you tried using tasker, turning on the lockscreen pattern in the phone's settings, and toggling the option Keyguard Pattern in tasker? It worked for me in 2.1 while no other app/widget did.
    – Malabarba
    Commented Feb 20, 2011 at 16:22
  • I haven't used Tasker unfortunately. I did assume Android was more secure than that. I'll give Joe's answer a +1 and hope pootzko changes the accepted answer. Commented Feb 20, 2011 at 17:02

As mentioned earlier, Tasker can handle this sort of thing. You can set up a toggle button as you described by following these directions. I have something similar set up so that it doesn't ask for my security PIN when I'm connected to my home network. If I'm away from home, I do have to enter my PIN. It's quite handy. The only downside to using this is that you'll lose the sliding unlock function when your keyguard is disabled. When you hit your unlock button your screen will come on without any slider. It's only a concern if you think you'll accidentally hit the unlock button in your pocket. Personally, I can't get the touch screen to do anything against my clothes anyways.


I'm not sure but I think most widgets that used to be able to toggle the lock screen security no longer work in Froyo (2.2) and above.

I was about to suggest LockMe Widget, but then noticed you have 2.2 and the dev says it doesn't work with 2.2

There's also the ultra useful and feature-rich Extended Controls - which purportedly does have this functionality, but you'd best test it before purchasing it.


On my phone running 4.4.2 I've used a combination of Tasker and Secure Settings to disable/enable the PIN lock screen based on my phone's position. Worked pretty well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .