THIS WORKED FOR ME:
I messed around with the smartphone's phone dialer app and it didn't help, also tried shutting off smart stay, no luck.
It got me to thinking...... What other apps do I have that may be running that also do the same thing as the phone dialer app, with the black screen when you put it to your ear or touch the top area of the phone by the front camera...... and YES, I do have apps like that!
My problem was being caused by an app called TEXTNOW.
These free text/voice call apps do the same black screen to ear thing but these apps are notorious for running slow, hanging, freezing or stopping altogether..... this is what happened to me, TEXTNOW was left in a half running state thus the black screen issues when touching my phone near the camera.
If you're lost after trying all the recommendations here, try looking to see if you have one of these free type phone or text messaging apps on your device.
Press and hold it's icon and select APP INFO, then FORCE STOP it.
Voila! Worked for me! I hope it works for you too!
(Instructions above are for the Samsung S4 Smartphone but will work with most other models, but the same setting screens might be in slightly different locations.)
[link redacted by Mod]