From 96c031af4e6e7b820aef0eb6328a9fbc19396497 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 3 Jul 2023 09:16:44 -0500 Subject: [PATCH] There is apparently a limit to the number of phone account on some OS Which was causing a crash here. --- src/main/java/eu/siacs/conversations/entities/Contact.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Contact.java b/src/main/java/eu/siacs/conversations/entities/Contact.java index 91a3b7ca77566e3c297c7491fe153f1403801c1c..203e81b2edf0dad58f06658c928d792e8cc794b6 100644 --- a/src/main/java/eu/siacs/conversations/entities/Contact.java +++ b/src/main/java/eu/siacs/conversations/entities/Contact.java @@ -690,7 +690,11 @@ public class Contact implements ListItem, Blockable { PhoneAccount.CAPABILITY_CALL_PROVIDER ).build(); - telecomManager.registerPhoneAccount(phoneAccount); + try { + telecomManager.registerPhoneAccount(phoneAccount); + } catch (final Exception e) { + Log.w(Config.LOGTAG, "Could not registerPhoneAccount: " + e); + } } // Unregister any associated PSTN gateway integration