From 4c8c10308510b9e21655b0fc737ca851b8cce499 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 6 May 2024 11:52:15 -0500 Subject: [PATCH] If security exception, don't fail call --- .../CallIntegrationConnectionService.java | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/services/CallIntegrationConnectionService.java b/src/main/java/eu/siacs/conversations/services/CallIntegrationConnectionService.java index 81e44f13e3c87e2d2ee49576137efcde769fbf9d..908de5e332b7e25117dd6a7ff6ac1bd7392ccb50 100644 --- a/src/main/java/eu/siacs/conversations/services/CallIntegrationConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/CallIntegrationConnectionService.java @@ -363,23 +363,22 @@ public class CallIntegrationConnectionService extends ConnectionService { } try { service.getSystemService(TelecomManager.class).placeCall(address, extras); + return; } catch (final SecurityException e) { Log.e(Config.LOGTAG, "call integration not available", e); - Toast.makeText(service, R.string.call_integration_not_available, Toast.LENGTH_LONG) - .show(); - } - } else { - final var connection = createOutgoingRtpConnection(service, account, with, media); - if (connection != null) { - Log.d( - Config.LOGTAG, - "not adding outgoing call to TelecomManager on Android " - + Build.VERSION.RELEASE - + " (" - + Build.DEVICE - + ")"); } } + + final var connection = createOutgoingRtpConnection(service, account, with, media); + if (connection != null) { + Log.d( + Config.LOGTAG, + "not adding outgoing call to TelecomManager on Android " + + Build.VERSION.RELEASE + + " (" + + Build.DEVICE + + ")"); + } } private static PhoneAccountHandle findPhoneAccount(final Context context, final AbstractJingleConnection.Id id) {