I'm using PocketShield now. It's not freeware, but it's pretty inexpensive ($6-$7). It's got all kinds of options. One of the coolest being that you can set it so the phone won't unlock on incoming calls if there's not enough light to trigger it. So it won't unlock in your pocket, case, or whatever. Then as soon as you pull it out, voila! unlocks...
http://pocketshield.netserver01.com/