Google recently rolled out a new Smart Lock option labeled "On-body detection" for Android Lollipop via an update to Google Play Services. As I'm sure you can gather from the name, this new function keeps your phone or tablet unlocked using the built-in accelerometer to determine whether or not your device is being carried on your body, allowing you to set it down and walk away carefree knowing that's it's locked again.
If you know you'll be walking for a while, like out shopping or on a hike, and don't feel like entering your password, pattern, or PIN every single time you periodically check your phone, you can toggle this option on and your device will detect that it's in motion, keeping it from entering a locked state.
While the new addition seems pretty interesting, I can't really see myself using it that often. I use "Trusted places" and "Trusted faces" frequently, but I doubt that I'll remember to toggle this on before walking extensively. A quick toggle seems like the most practical way to implement a feature like this, letting me just tap an icon to enable the service when I know I'll use it.
That being said, know that if you set your device down in a public place, a stranger picking it up will not allow them free access to your device. Instead, once your device has been placed down, or "off-body," you'll need to enter your password, pattern, or PIN once before gaining access to your device. However, it's plausible that a pickpocket could take off with your device and have full access, as long as they keep things moving.