There is apparently a limit to the number of phone account on some OS

Stephen Paul Weber created

Which was causing a crash here.

Change summary

src/main/java/eu/siacs/conversations/entities/Contact.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

Detailed changes

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