How to enable the Pixel 2's Do Not Disturb while driving feature

The toggle is a little buried in the Settings app, but it's there.

Josh Miller/CNET

In an attempt to make all of us safer drivers, Google has added a Do Not Disturb mode that automatically turns on when it detects you are in a moving car.

Now playing: Watch this: Why are people talking about the Pixel 2 XL screen?

Here's where to find the setting:

Screenshots by Jason Cipriani/CNET

Open the Settings app then go to Sounds > Do not disturb preferences > Add more > Driving.

Slide the switch to the On position, and tap on the Do not disturb button just below it to customize what is and isn't allowed to break through DND mode.

According to Google's support page, DND will automatically turn on after your phone connects to Bluetooth in a car, or the phone detects movement that would indicate you're in a car. The feature will then turn off after 30 seconds of walking or 10 minutes of no movement.