Google has started to roll out a new “On Body Detection” security feature. This feature will detect whether you are carrying the device or have placed it somewhere and based on that, it will change the security settings.
Once switched on, the device will stay unlocked as long as it detects that it’s being held or carried in a pocket, handbag, or the like. When the phone is set down (movement is no longer the detected) it locks up, so the next time you pick it up you’ll need to enter your PIN, password, or pattern.
This feature reduces the number of times you have to unlock your device. However it opens up one security flaw. If your phone has been jacked off by some other person, it wont be able to detect it and this may give rise to some problems.
This feature is only available for the Android Lollipop users. You need to update the Google Play Services to version 7.0.97 to get this feature. You can enable this feature by going to Settings >> Security >> On Body Detection.