Google is reported to soon come with a new feature on its Android phones that will facilitate detecting human touch and result with automatic adjustment of the lock mode.
Using the accelerometer of the phone, the feature can figure out when you are holding the phone or have it in your pocket, and lock it when it is away.
If you unlock the device once, it will stay unlocked till you are holding it or keep it in your pocket. Once you keep the phone away, it will lock again; while picking it up again will require you to manually put in the passcode.
AndroidPolice stated in its report that the purpose behind the feature is to add just a little convenience and security, and avoid the data being easily stolen by potential thieves if you leave your phone sitting on a table or forget it somewhere.
However, there is a catch here. If you hand your phone to someone else while it is unlocked, it will not lock again as the feature isn’t equipped to recognise owner’s hands or which pocket it sits in.
The feature was spotted on Nexus 4 running Android 5.0.1 OS. Although it is not a feature related to the latest Android 5.1, but would require a 5.0 OS or above that to work.