I just solved this on my S4. To determine if the sensor is bad, restart your phone in safe mode by holding the "volume down" button during startup. Try making a call and see if your sensor works. If it does, your problem is likely caused by a recently installed app. I just deleted a few...