This is related to an issue with Android custom ROMs on the legacy device the LG G4, since the move to A12 and A13. This doesn't occur on any version below A12.
I need your help with debugging the black screen issue on telephone calls in A13 on the LG G4.
As soon as we accept a telephone call, the screen goes black, and the only way to interact with the phone is via the power button.
There is some issue with the proximity sensor on this device since A12+.
However, any testing app I have used states that the proximity sensor is detected and works correctly but no ROM seems to make use of it.
We have been doing a lot of testing to help try and find a root cause.
We noticed that if the headset is plugged in, the black screen issue doesn't occur. This behaviour is explained in [ProximitySensor.java](https://github.com/LineageOS/android_packages_apps_Dialer/blob/lineage-20.0/java/com/android/incallui/ProximitySensor.java#L205) :
>Proximity wake lock will be released if any of the following conditions are true: the audio is routed through bluetooth, a wired headset, or the speaker; the user requested, received a request for, or is in a video call; or the phone is horizontal while in a call.
We took some logs of phone calls, and I noticed, when filtering on proximity in the logs, we have two different situations:
- telephone call with headphones (log filtered by proximity)
=> screenOnImmediately: true
- telephone call No headphones (log filtered by proximity and PID of dialer)
=> screenOnImmediately: false
I think we need to debug the code to find out why the proximity sensor doesn't reply correctly, or isn't queried correctly.
I think the important parameter is PROXIMITY_SCREEN_OFF_WAKE_LOCK. See [ProximitySensor.java, line 69](https://github.com/LineageOS/android_packages_apps_Dialer/blob/lineage-20.0/java/com/android/incallui/ProximitySensor.java#L69)
and [ProximitySensor.java, line 198](https://github.com/LineageOS/android_packages_apps_Dialer/blob/lineage-20.0/java/com/android/incallui/ProximitySensor.java#L198) .
I see references to the parameter PROXIMITY_SCREEN_OFF_WAKE_LOCK in frameworks_base and frameworks_native.
Asked by Antóin
(61 rep)
Sep 20, 2024, 09:34 AM
Last activity: Sep 21, 2024, 10:25 AM
Last activity: Sep 21, 2024, 10:25 AM