Here are some codes that might give you the option to run a test on the sensor if you’re having this issue on a Smartphone. Try and run a proximity test on the device.
After you’re done with your conversation and remove the phone from your ear the sensor is then supposed to unlock your screen and allow you to end the call. The sensor is supposed to recognize when you hold your phone up to your ear, so that the phone will lock (turns on the black screen), then you won’t accidently press keys with your cheek when talking to other people on the phone. The proximity sensor is a small little sensor, usually on the top of the phone next the logo or speaker you hold up to your ear.
The most common reason for this issue is that the proximity sensor on your phone is not working correctly. Have you found yourself getting stuck on your telephone calls? Is your phone showing a black screen after finishing a conversation and not allowing you to end calls? Do you hear your keys being pressed when talking on your phone? Does the person that you’re talking to have to end the call because your phone won’t let you? Do you have to press your power key to unlock your phone after every call? Here are some possible causes and better yet some solutions to fix this issue on your cell phone.