Change summary
src/cheogram/java/com/cheogram/android/ConnectionService.java | 6 +++++
1 file changed, 6 insertions(+)
Detailed changes
@@ -112,6 +112,12 @@ public class ConnectionService extends android.telecom.ConnectionService {
}
Account account = xmppConnectionService.findAccountByJid(Jid.of(gateway[0]));
+ if (account == null) {
+ return Connection.createFailedConnection(
+ new DisconnectCause(DisconnectCause.ERROR)
+ );
+ }
+
Jid with = Jid.ofLocalAndDomain(tel, gateway[1]);
CheogramConnection connection = new CheogramConnection(account, with, postDial);