created by surfsmurf of xda:
Latest version is 0.3.3. Get it from
http://sourceforge.net/project/showf...kage_id=290047
I don't read this forum every day, if you want to make sure I get your bug report please
follow this link.
If you feel like donating, you can do so
through SourceForge. No pressure, I'm really writing this one for myself
You can also show your support by
becoming a fan on Facebook.
Update 2008 Sep 1
Version 0.3.3 was released today with the following improvements:
- Fixed bug where SensorLock would occasionally be disabled at startup.
- Added option to signal successful gestures using sound.
- Added option to unlock phone when a call is connected.
- Added option to relock phone when returning to battery power.
- Added option to relock phone when stylus is inserted.
Update 2008 Sep 26
Version 0.3.2 was released today with the following improvements:
- Unlock on external power will now keep the device unlocked, even when the device resumes from sleep.
- Autolock can now be set to happen only when there's an incoming call.
- Option to unlock phone when call ends added.
- Headset/music support, SensorLock now correctly detects when the device resumes while playing music.
- AppToDate support added.
Update 2008 Sep 19
Version 0.3.1 was released today. This is a bugfix/usability update, there are no new major features. After a lot of research I've come up with another way of locking the touchpanel, using the same hooks that the Transcriber IME uses. This should be a lot more system friendly. Like the old code, this is not compatible with the Transcriber IME, so I've added a new Transcriber compatibility mode which restricts locking methods to the "everything" mode. Sorry, but currently I don't see any way around this unless I were to revert to traditional locking methods. Which I won't. I've also implemented what I hope will be a fix for the soft reset bug on some devices where SensorLock would not work without first disabling it.
0.3.1 changes:
- Replaced touch panel locking code. The new version should be able to keep the panel locked and also eliminates the short interval where the display was not locked. Interestingly, finger scrolling is still possible in some windows, although you are not able to select anything.
- Added Transcriber compatibility mode.
- Attempt at fixing the soft reset bug where SensorLock would not detect gestures at startup.
Update 2008 Sep 15
Version 0.3.0 is finally done. There's been a lot of changes under the hood, but I suspect you're mostly interested in what's new. The much requested control panel app is finally here, find it in the Personal tab. Another new feature is the programmer API - other applications can now talk to SensorLock. This is of particular interest to other G-Sensor based applications, especially fullscreen games. The API is released under the
WTFPL and is documented in
sensorlock.h here.
0.3.0 changes:
- Added control panel application.
- Rotating the phone can now toggle lock state.
- Phone can now be unlocked when stylus is removed.
- Added programmer API licensed under the WTFPL
- New icon donated by http://npweb.biz
Update 2008 Sep 7
I unexpectedly had a breakthrough and managed to get the hardware buttons enabled separately from the touch panel. I hope this new behaviour will suit most people, otherwise wait for 0.3 with a configuration panel.
0.2.3 changes:
- Hardware buttons are now enabled (touch panel is still disabled) when device resumes from standby (e.g. when a call comes in).
- Touch panel and hardware buttons are now automatically unlocked when plugged into external power.
- Gesture detection now disabled when on external power.
Update 2008 Sep 4
Fixed a few bugs, just trying to get the current version stable before adding any new major features.
I have also investigated whether the current locking mechanism can lock just the screen - it seems it can't

I know a lot of people want the buttons to be active when there's an incoming call but at the moment it's looking very unlikely. I'm pursuing another idea which may help though.
0.2.2 fixes:
- Added a few calls to disable the vibrator, hopefully fixes the weird "vibrator is on after soft-reset" bug some people experience.
- Fixed a bug where you couldn't unlock the phone immediatly after locking.
- If phone is standing upright, gestures are ignored.
Update 2008 Sep 4
The project is now active on SourceForge, files can be downloaded from
http://sourceforge.net/project/showf...kage_id=290047
I've put up a version 0.2.1 which is a bug fix release. It has a rewritten gesture detector which seems to work much better for me at least, and it also draws less power. Vibration now works much better in TomTom.
I'm listening to all your suggestions, don't worry! 0.3 will have many of them implemented, but I thought it was important to get these annoying things fixed.
Update 2008 Sep 3
While I wait for SourceForge to accept the project I thought I might put a new version up here.
v0.2 adds vibration feedback when successfully locking or unlocking the phone. Also, the phone is now automatically locked when suspending. This may not be to everybody's taste, in that case stick to the first version and wait for the next one with a configuration panel
Original post
Frustrated with the available lock programs, I've written SensorLock that will lock and unlock the touch panel and buttons using the G-Sensor. It is released under the GPL v3 license.
The archive contains setup.exe, .cab and source.
From the readme:
---
SensorLock is a program designed for the HTC Touch Diamond (and will probably work on the HTC Touch Pro too).
SensorLock allows you to lock the device's screen and buttons, thereby preventing random button and screen presses while the device is in your pocket.
Locking and unlocking is simply done by rotating the device around its longest axis (clockwise for locking and counter-clockwise for unlocking) and can be done in any program (Media Player, TomTom etc) without disrupting normal device operation.
---
If that doesn't make a whole lot of sense, I've put together a short demo video on YouTube
http://www.youtube.com/watch?v=rw_bztlQuZw
Follow the XDA thread for updates:
http://forum.xda-developers.com/showthread.php?t=422871