My S5 developed this problem and it frustrated me. I had to swap with my sib's A3 but after a while the same flickering began. I tried most of the solutions here especially the developer option but what worked for me was disabling auto screen brightness and setting the screen at a medium to high level. I tried same on my previous S5 and disabling the power saving mode as well as the auto screen brightness solved the issue.