~singpolyma/cheogram-android

96c031af4e6e7b820aef0eb6328a9fbc19396497 — Stephen Paul Weber 1 year, 3 months ago 4e0d6c4
There is apparently a limit to the number of phone account on some OS

Which was causing a crash here.
1 files changed, 5 insertions(+), 1 deletions(-)

M src/main/java/eu/siacs/conversations/entities/Contact.java
M src/main/java/eu/siacs/conversations/entities/Contact.java => src/main/java/eu/siacs/conversations/entities/Contact.java +5 -1
@@ 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