Added use of light sensor if no proximity sensor is detected.