Google is rolling out a new automatic “smart lock” function that uses the accelerometer to estimate whether you’re holding the device or it is in your pocket. You’ll have to enter your PIN or Pattern the first time you pick your phone up, but from then on, so long as the phone thinks it’s still on your body, it won’t prompt you to reenter that PIN. If you put it down, or maybe even just sit perfectly still for too long, you’ll have to re-authenticate yourself.
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.
This new security feature is being rolled out to the Android 5.0 and higher smartphones. Also, this update will require Google Play Store 7.0.97 and higher version running on the Android 5.0 Lollipop devices. If you’re not seeing it yet. Head to Settings > Security > Smart Lock to see if it’s there