WhisperSystems/RedPhone — pull request #60 by emblem (2012-11-10 05:40:20+00:00)
Title: Use the proximity sensor to turn of the screen during calls

We use the IR proximity sensor, if available, to turn the screen off
while in-call, if it appears the user's face is close to the screen.

This also fixes an exception that occurred on pre JB devices that did
not include the isKeyguardLocked() method.

Next step is to use the accelerometer to only enable proximity wakelock
when the phone is in a 'phone-like' orientation. (PhoneApp does this)