I just checked one out, that had the same problem. In that case, the previous owner had replaced the screen and damaged the front camera with the sensors. Camera is very easy to replace and cheap. But he'd also broken off two contacts on the motherboard, which must have had a role in the sensor control. Got the camera working again, but not the sensors. If you can't return the phone, it might be worth buying a replacement front camera with sensors, but maybe open it up first, and see if anything is loose or disconnected.
Sent from my SM-N900T using Tapatalk