Got this from Telegram group.
(Not a big fan of Telegram, information should be publicly available, and I hate meme cat GIF).
Here's the solution (apparently -I'm not experimeting this bug) :
"SystemUI crash or black screen while plugging headphones or connecting to bluetooth media devices turns out to be a google derp.
Update your google app from the play store to fix it. "