diff --git a/src/main/java/eu/siacs/conversations/services/CallIntegration.java b/src/main/java/eu/siacs/conversations/services/CallIntegration.java index 86a824ffb..339268fa3 100644 --- a/src/main/java/eu/siacs/conversations/services/CallIntegration.java +++ b/src/main/java/eu/siacs/conversations/services/CallIntegration.java @@ -28,6 +28,7 @@ import eu.siacs.conversations.xmpp.Jid; import eu.siacs.conversations.xmpp.jingle.JingleConnectionManager; import eu.siacs.conversations.xmpp.jingle.Media; +import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Set; @@ -36,6 +37,12 @@ import java.util.concurrent.atomic.AtomicBoolean; public class CallIntegration extends Connection { + private static final List BROKEN_DEVICE_MODELS = + Arrays.asList( + "OnePlus6" // Device is buggy and always starts the operating system call screen + // even though we want to be self managed + ); + public static final int DEFAULT_TONE_VOLUME = 60; private static final int DEFAULT_MEDIA_PLAYER_VOLUME = 90; @@ -462,7 +469,9 @@ public class CallIntegration extends Connection { } public static boolean selfManaged(final Context context) { - return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && hasSystemFeature(context); + return Build.VERSION.SDK_INT >= Build.VERSION_CODES.O + && hasSystemFeature(context) + && !BROKEN_DEVICE_MODELS.contains(Build.DEVICE); } public static boolean hasSystemFeature(final Context context) { diff --git a/src/main/java/eu/siacs/conversations/services/CallIntegrationConnectionService.java b/src/main/java/eu/siacs/conversations/services/CallIntegrationConnectionService.java index a234fc781..95f1f6785 100644 --- a/src/main/java/eu/siacs/conversations/services/CallIntegrationConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/CallIntegrationConnectionService.java @@ -373,7 +373,10 @@ public class CallIntegrationConnectionService extends ConnectionService { Log.d( Config.LOGTAG, "not adding outgoing call to TelecomManager on Android " - + Build.VERSION.RELEASE); + + Build.VERSION.RELEASE + + " (" + + Build.DEVICE + + ")"); } } } @@ -384,7 +387,10 @@ public class CallIntegrationConnectionService extends ConnectionService { Log.d( Config.LOGTAG, "not adding incoming call to TelecomManager on Android " - + Build.VERSION.RELEASE); + + Build.VERSION.RELEASE + + " (" + + Build.DEVICE + + ")"); return true; } final var phoneAccountHandle =