Make your own proximity sensor cushion to correct problems with your screen staying on or turning off at the wrong times. This is often required after replacing the display on your smart phone.
The main objective here is to create sufficient separation between the two windows in front of the proximity sensor. If light bleeds over from one section into the other it will cause the sensor to malfunction or not work at all. In rare cases you might have a defective sensor but this is rare unless the phone was badly damaged where the window is located.
I will create a more in depth video when I have time.