My HTC one mini screen is flashing with the welcome screen on and off, how can I fix this?

A

AC Question

My HTC one mini screen is flashing with the welcome screen on and off

I had my phone in my pocket and took it out to find the welcome screen with the white background flashing every 7 seconds for about 7 seconds, what has gone wrong?