they are two different sensors, one next to the other besides the front camera, with different behaviour. The one that turns the screen off in call is the proximity sensor, while the one that defines screen brightness and keyboard light on-off is the light sensor.