Are you saying its doing the opposite of the
Auto answer calls feature? Instead of turning on when lifted to the ear - it turns off?
Do you have Fastboot enabled? If so try disabling it, turn off your phone (not restart) for ~3 minutes, and then power it back on to see if you still have the problem.
Have you recently updated the software (OS) on the phone? If you have the clear cache procedure may clear up the problem. Its overall a good troubleshooting method for when things start behaving weirdly regardless. Here is how to do it:
Turn off the device.
Press and hold the Volume Down key.
Press and release the Power key to turn the phone on.
Continue holding the Volume Down.
Release the Volume Down key when the three Android images appear on the bottom of the screen.
Press the Volume Down key once to move the cursor from FASTBOOT to RECOVERY.
Press the Power key to begin the wipe.
The device displays the bootup screen followed by a phone with a red triangle.
Press the Up Volume key and Power key at the same time.
Press the Down Volume key three times to select Wipe cache partition.
Press the Power key to initiate the wipe.
Wait until the phone displays Cache wipe complete.
Press the Power key to select Reboot system now.