Open the slider and press the plastic behind the screen on the side of the proximity sensor - it may be loose and this causes the proximity sensor to get weird. My phone is doing this - seems like a hw problem - maybe a screw is missing - so I'm opening the keyboard very carefully as spring open is dislocating that part of the back again. This might be the issue with proximity in SFOS too.