DD would have been justified to leave, informing Mary that she could contact her when she was less busy.
I have done this. I have a very dear friend who was constantly taking calls and text messaging back and forth when we were having dinner or just sitting and talking. Finally, one time, we were at her house and after 30 minutes of her texting another friend since I got there, I stood and I got my purse and said "You are obviously very busy, give me a call when you have more time."
We met for dinner a few weeks later, and once again, the phone was whipped out, and after the second text message (we had not been seated yet) I said, "If you are busy or would like to have dinner with X instead, I completely understand." It has not happened in the 2 1/2 years since.
I would like to note these messages were of the. "what are you doing.", "Eating shrimp" Watching ER" type, not anything that could not wait.
This friend was also there when I left dinner one evening after asking one of the people to stop cussing for the 10th time and told him I would leave if he did it again. We were sitting very near children and every other word out of this mouth was a MAJOR cuss, like the "f" word. She knew I would leave.
So send me to E-Hell for being touchy, but I feel if I took the time to visit with you, you should pry yourself away from the phone and acknowledge my presence.