the iphone doesn't auto lock the device when you put it into your pocket, you'll have to do it manually. they only have a timer based auto-lock option based on (lack of) user input.
Look at autolock on the N810. Uses the light sensor to detect if it is in the sleeve. Works almost perfectly, almost never mistakes your hand for the sleeve or something like that.