I dropped my phone and looks like my proximity sensor no longer works reliably. It returns Near all the time. The problem is, the display turns off during call and I wont be able to use the number pad to enter pin or conference another call, or even disconnect the call. I found the Power button disconnect option in Accessibility settings and uses that now.
I tried to create an app that tries to obtain a full wakelock when a call is received hoping that it will keep the display on.
Created a broadcast receiver that invokes a service when the phone state changes to OFFHOOK
The service acquires a full wakelock and releases it only when phone state is IDLE.
But still, proximity sensor turns the display off. I used the isHeld() method to make sure that the lock is acquired. I used PowerManager's isScreenOn() method and it returned true even when the screen was off during the call. I tried to obtain the wakelocks every two second in a loop for testing, still the display won't come up.
I'm using a Nexus 5 Android version 4.4.4
Can anyone suggest an idea to override the proximity sensor behaviour? A root-required option is also fine.
Thanks!