...I was curious as to the nature of the proximity sensor. n64man helpfully pointed out that it uses IR, which I confirmed by using my digital camera. The picture is crappy, because digital cameras have filters that reduce performance in the IR spectrum, but with a long exposure you will notice the LED in the upper left corner. This is probably an IR rangefinder, with an effective range of about one inch or so. It sends out an IR pulse, and then looks for the presence or absence of a reflection. I use the term reflection loosely, as this isn't anything like a mirror's reflection.
A lot of people have noticed that bright light screws with the proximity sensor. The sun has a pretty wide spectrum, so it could be that the IR from sunlight tricks the sensor into thinking that it's seeing a reflection. I'm pretty sure the light blinks, so I tried using a remote control's IR LED to see if it could trick the sensor into thinking something was close; sometimes it worked, sometimes it didn't. I know remote controls blink at 40 kHz, so the proximity sensor might work on a different frequency. Perhaps I'll rip out the old breadboard and play around with an oscillator to see if I can find the right frequency.
Hopefully this knowledge might be able to help someone who is having problems with the screen blanking during phone calls. See also this epic post by jamsesh for more great discussion on how to trick the sensor in bright sunlight...More...