answered
2020-03-23 11:47:10 +0200
That "for short calls, the screen is only dimmed" part makes me think: are you using headset? Or speaker?
Which would mean the display is going through normal dim after inactivity and then blank sequence -> Just press the power button to turn display on & terminate normally via call ui.
(The fact that end of call leads to display lighting up to show call terminated dialog indicates that this is not related to some proximity sensor woes.)
EDIT 2020-03-25:
The way it is supposed to work is ...
Incoming call (phone is ringing): if/when proximity sensor is not covered, display is turned on and then kept on until call is answered or ignored.
Active call (you called someone or answered incoming call): display is blanked when proximity sensor is covered, and unblanked when proximity sensor is uncovered. If display is on long enough, normal dimming/blanking timeouts do apply and display will eventually turn off (and e.g. power key needs to be used to turn it on again). Also, if speaker/headset is used, the proximity sensor rules do not apply.
If proximity sensor is misbehaving so that it constantly reports "covered"
- Incoming call: display stays off and power key is reserved for ignoring the call -> no way to power up display.
- Active call: display is blanked immediately after initiating/answering a call. Pressing power key will unblank, but because proximity sensor is (reported as) covered -> It will be turned off again.
If proximity sensor is misbehaving so that it constantly reports "not covered"
- Incoming call: display is always powered on, even when the phone is in pocket etc -> "pocket calls" are more likely to happen.
- Active call: putting the phone at ear does not power off display and touchscreen can react to chin/ear -> calls can end up muted, held, etc
Now, with that in mind
@danfin: Your original description plus "always calling phone to ear" comment -> sounds like you have situation with proximity sensor stuck in "not covered" state.
and @filip-k: "can't switch the display on as it only show itself for a brief moment" -> implies proximity sensor stuck in "covered" state. (Also, both cover and proximity sensor are used for determining whether it is ok to unblank display - if either one is misbehaving, problems are similar even if the other sensor is still functioning as expected).
It is more or less expected that dirt/sweat/grease can cause proximity sensor to incorrectly report "covered" (swiping the sensor are with cloth is usually enough to remedy such situations). As device ages (scratches on display, dust gets under display, whatnot) these situations are more likely to occur and/or harder to recover from.
Having proximity sensor stuck at "not covered" state is much more rare. Basically the only situation where I've seen it happen is XA2, Xperia 10 & co where some underlying sw issue causes the sensor to stop reacting to changes - at which state it reports whatever the last value happened to be until the sensor is power cycled (normally p-sensor is always kept powered on, but as a workaround in these devices it is kept powered off except during calls etc).
As a quick and temporary relief to sensor-stuck-at-covered situations: Doing a triple power key press will make the system ignore both proximity and cover sensor until they start reporting changes again -> display will power up, calls can be answered and terminated. However, effectively the sensor is now stuck in not-coverd state -> pocket calls etc are more likely.