start to maintain list of devices with broken call integration

This commit is contained in:
Daniel Gultsch 2024-04-16 08:51:40 +02:00
parent 960b20db3e
commit 244c29cd6f
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
2 changed files with 18 additions and 3 deletions

View file

@ -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<String> 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) {

View file

@ -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 =