Android has gone through a few iterations of “Do Not Disturb” mode, but hasn’t gotten it right – until Android 6.0 Marshmallow.

When an alert comes in from Facebook, Twitter, Google+, YouTube, Skype, Hangouts, Gmail, Google Voice, text message, or a phone call, my whole dresser lights up, sounds off, and vibrates.
Needless to say, I learned very quickly to silence all of my devices before turning in for the night – but that’s cumbersome and time consuming – and Heaven help me if I forget to some night!
Android M, the preview versions of Google’s latest operating system that would eventually become “Marshmallow”, took meaningful steps toward solving this issue – but “M” still didn’t do DND very well. It wasn’t until Android Marshmallow landed on my Nexus 6 and I saw the “Do Not Disturb” icon in the quick toggles pull-down menu that things began to change.

So far so good, but at the bottom of that panel is a “More Settings” link. That’s where the real beauty comes in.
Under “More Settings” you can define what “Priority only” means. In my case, “Priority” alerts are alarms, reminders, events, and messages and calls from contacts that I’ve “starred”. Because my phone number is “out there” and somewhat available to the public, I’ve disabled categorizing “repeat callers” as a priority event, though you may want to enable this feature to allow calls through if the same person rings a second time within a fifteen minute period.
Results
Setup is easy and the rules always fire when they’re supposed to. Android Marshmallow finally got Do Not Disturb Mode right, and my wife has been able to sleep peacefully ever since I upgraded.