Android device running Lollipop is silently getting a new feature whereby the phone detects post being unlocked whether it is in your hands or in the bag and, therefore stays unlocked. Google is calling it ‘On Body Detection’ which basically means that as long as you are likely to use the device and have it unlocked, it shall stay unlocked. This prevents you from continuously having to input your PIN code or the pattern that you may have registered on the device for security purposes.
The way it works is that once you have unlocked the phone, it will detect via the accelerometer if the device is still in use despite being screen off, in this case and scenario, the device shall not apply any of the locking restrictions. Obviously it is extremely easy to bypass this lock mechanism but it could be extremely handy in case you live alone and are drop dead sure nothing can go wrong.
Like any security feature, you can decide to turn the feature on or off based on your requirement, though we personally would prefer keeping the device only to unlock when it detects a wearable, a G Watch in our case. The feature as we mentioned, is being rolled out in phases so if your device has not received it, fret not, it would be available very soon. Once you get the feature, it will show up at Settings>Security> Smart Lock for you to enable or disable it.
Source: Android Central