This fixes the problem where notification and ringer sounds come out of the external speaker instead of through headphones when plugged in.