Motorola just pushed out an update to a new app for its current line of phones called Modality Services. Modality Services should help your Motorola phone (Moto X, DROID ULTRA, MAXX, or Mini) “respond more intelligently to motion, phone orientation (e.g. face up/down) and stowed state.” In other words, Modality Services know if your phone is moving, how its lying on your desk, and if you have it in or out of your pocket.
The update specifically helps with in-vehicle detection by using ambient audio signals.
As is noted in the listing for the app, it is best to keep Modality Services up to date because it works with Active Display and Motorola Assist.