I have a HTC Wildfire S and set up the screen lock pattern for it. This triggers after some time but sometimes I want to lock it myself, for example if I leave the office and let my phone on the desk.

In Settings | Security | Lock phone after I can use the "Immediately" option but this closes every time the screen turns of.

Is there some way I can keep it to lock after some time as it is now but also lock it whenever I want?

6 Answers 6


You can press the power button or use program like Screen Off and Lock. The advantage of software lock is it will prevent wear and tear of your hardware button.


Try using Temporary Lock. It allows you to lock the phone on an as-needed basis. (There is a free trial.)


The setting you have mentioned there will work when you manually turn off the screen - on my HTC Desire it is pressing the power button.

With "Lock phone after" set to "Immediately" it will lock the phone once the screen turns off (manually or after timeout)

To set the screen timeout go to Settings | Display | Screen timeout and set it to however long you want the screen to stay on for until it automatically turns off.

The two timeouts work separately:

  • Screen timeout is for when the screen turns itself off (for the battery conscious)
  • Lock timeout for when the lock screen will be shown (for the security conscious)

For example, I have Screen timeout set to '2min', and Lock timeout set to 'Immediate'. So if I leave my phone without touching it, 2 minutes later the screen will turn itself off. If I immediately turn the screen back on, I will be challenged with the lock screen.

If I keep Screen timeout as '2min' and change Lock timeout to '5min', then like before without using the phone, the screen will turn itself off in 2min. However if I immediately turn the screen back on, there will be no lock screen. Only after 5min of not using the phone will I be challenged with the lock screen when I turn the screen back on.

  • Won't that keep my screen on for the entire duration? (i.e. If I set the lock to 15 min and the screen timeout to 15 min, won't the screen stay on 15 min?). Won't that suck up my battery? Nov 28, 2011 at 9:50
  • The two timeouts work separately - updated the answer with examples to make it clearer.
    – pyko
    Nov 28, 2011 at 12:01

I have a Samsung S3 mini (Android 4.2.2). I prefer to lock the device manually. I also prefer to turn the display on and off manually without locking the device. To keep these functions separated, I made three configuration changes.

  1. I set a long lock timer (15 minutes).
  2. I set a long screen saver timer (10 minutes).
  3. I installed a widget called Screen Off.

Touching Screen Off locks the device instantly. Pressing the power key turns the display off and on, but does not lock the device. The long timers eventually turn off and lock the device when I forget.


This should be possible using Tasker. While it might be a bit expensive if used for this one purpose only, there are so many other things you can solve with it, so it finally is definitly worth the money. A free trial is available at the dev's website.

But back to your question. I didn't try it out (yet), but basically it should work like this:


You first need three tasks, to enable/disable/delayed_enable the lock:

  • Task "Activate_lock":
    • Display -> KeyGuard: On
    • Variable -> Variable Set -> Name: %MyLocker, To: 1
  • Task "Deactivate_lock":
    • Display -> Keyguard: Off
    • Variable -> Variable Set -> Name: %MyLocker, To: 0
  • Task "Delayed_lock":
    • Task -> Wait (configure the delay time here)
    • Display -> KeyGuard: On
    • Variable -> Variable Set -> Name: %MyLocker, To: 1


A single profile should take care for the automated locking:

  • Condition:
    • Variable -> Variable Value -> Name: %MyLocker, Op: "Math: Isn't equal", Value: 1
    • State -> Display -> Display State: Off
  • Task: Delayed_lock


Tasker allows you to create widgets for tasks. So you create two of them: one for "Activate_lock", and one for "Deactivate_lock". Configure your system for immediate lock.

What will happen?

  • If you hit "Activate_lock", your screen will be locked. Unlock it and work as usual, and as soon as you turn your display off, it is locked again. This is the "immediate lock" you wanted.
  • If you hit the "Deactivate_lock", you get your present state back: Once you turn off your screen, both conditions of the profile are met -- and after the configured delay, keyguard (and thus the locking mechanism) is switched on again -- your screen is locked.

All you have to do is make sure that it is set to 'Immediately' and then when you turn your screen off (by pressing your phones power button once), the phone will lock at the same time - and the screen will still be off.

You must log in to answer this question.

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