Description
Is your feature request related to a problem? Please describe.
When making a voice call in the Nextcloud Talk Android app, if the audio output is switched to a non-earpiece device such as the speakerphone or a Bluetooth headset, the proximity sensor remains active. This causes the screen to turn off when the sensor is covered (e.g., by a hand or when the phone is placed on a table), which is the standard behavior to prevent accidental touches when holding the phone to the ear. However, this behavior is unnecessary and inconvenient when not using the earpiece, as it blacks out the screen unintentionally, preventing the user from accessing call controls or other apps.
Describe the solution you'd like
I would like the proximity sensor to be automatically disabled during a voice call whenever the audio output is not the earpiece. The sensor should only be active when the call audio is routed through the earpiece to prevent accidental screen touches. When the audio is routed to the speakerphone or a connected Bluetooth device, the screen should remain on, regardless of the proximity sensor's state.
Describe alternatives you've considered
A possible alternative could be a manual toggle button within the call interface to disable the proximity sensor functionality for the current call. However, an automatic deactivation based on the selected audio output would be a much more seamless and intuitive user experience.
Additional context
This behavior is inconsistent with how most native phone dialer apps and other communication apps (like WhatsApp, Telegram) handle audio routing. In those apps, the proximity sensor is typically tied to the earpiece audio path only. Adopting this standard behavior would greatly improve the user experience during hands-free calls on Nextcloud Talk.