I had the problem too and I fixed it by returning the phone to the shop and get it repaired. You may try to enter the test code *#0*# in the phone app and check "sensors". My phone recognized anything coming close, eg my hand, but didn't notice it any more when I took it away. It does not seem...