A proximity sensor works like this on almost all touch screen phones ever made.
An IR LED flashes out of a small window next to your notification LED, if that flash hits the side of your face and reflects back to the sensor separated by the black rubber boot inside the phone and blanks the screen and disables the touchscreen interface.
If there were no proximity detector and the touchscreen was not disabled you would be bumping all kinds of buttons and hanging up calls with your face which is just like your fingers for the purposes of interacting with a capacitive touch screen.
Could that IR LED and receiver be hacked to send out and maybe even receive a useful signal like the old IrDa infrared serial devices, maybe depending on how much the hardware is hard wired returning 0 or 1 signal vs having software and driver; but who other than a hacky user would want a micro-niche very directional communication method with a useful range measured in cm?
An IR LED flashes out of a small window next to your notification LED, if that flash hits the side of your face and reflects back to the sensor separated by the black rubber boot inside the phone and blanks the screen and disables the touchscreen interface.
If there were no proximity detector and the touchscreen was not disabled you would be bumping all kinds of buttons and hanging up calls with your face which is just like your fingers for the purposes of interacting with a capacitive touch screen.
Could that IR LED and receiver be hacked to send out and maybe even receive a useful signal like the old IrDa infrared serial devices, maybe depending on how much the hardware is hard wired returning 0 or 1 signal vs having software and driver; but who other than a hacky user would want a micro-niche very directional communication method with a useful range measured in cm?

