Call me old fashioned, but my parents just used to make us sit there and be quiet. Bored? That's life, learn to deal with it.
Both the parent and the child in your example are lacking discipline. The parent unable to tolerate a bored child and the child unable to tolerate boredom. This is a pattern I have personally noticed as early as babies being pushed around in prams with a smartphone or tablet in hand. A two year old definitely doesn't need a phone to relieve boredom but it's easy.