From b45a3eeaf2b9f657d3587a72b3af47a7265e2a8b Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 20 Oct 2024 16:39:17 +0200 Subject: [PATCH] disable call integration on Android 15 The call integration depends on the operating system giving us a list of possible output devices (speaker, earpiece, BT headset, ...) via a callback called `onAvailableCallEndpointsChanged()` that is called as soon as the app registers the call with the operating system. For outgoing calls on Android 15 this method is no longer invoked leaving Conversations without knowledge about what devices are available and thus without the ability to switch between speaker and earpiece. Logcat output seems to indicate that there might be some sort of race condition (there is a line that says something like: available endpoints changed but service was not bound) There is further evidence in that if one tries multiple calls in a row (10+) one might actually see the output device switcher / indicator. However after a full day of investigation it seems that the race condition is in the platform code; not in Conversations. --- .../java/eu/siacs/conversations/services/CallIntegration.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/eu/siacs/conversations/services/CallIntegration.java b/src/main/java/eu/siacs/conversations/services/CallIntegration.java index 99fda67df321874e7f9f48a8efa0e3b66bed19b7..be0446cd9f54f4b28d25fbb034dff021887257a7 100644 --- a/src/main/java/eu/siacs/conversations/services/CallIntegration.java +++ b/src/main/java/eu/siacs/conversations/services/CallIntegration.java @@ -527,6 +527,7 @@ public class CallIntegration extends Connection { public static boolean selfManaged(final Context context) { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O + && Build.VERSION.SDK_INT < 35 && hasSystemFeature(context) && isDeviceModelSupported(); }