Fail the connection if service is gone

(cherry picked from commit af8713a9f5fc925ae9aa74629d90b1390e58bb32)
This commit is contained in:
Stephen Paul Weber 2023-12-29 12:31:20 -05:00 committed by 12aw
parent c08a8d7b03
commit 3a865239b8

View file

@ -184,6 +184,12 @@ public class ConnectionService extends android.telecom.ConnectionService {
String withJid = extras.getString("with");
String sessionId = extras.getString("sessionId");
if (xmppConnectionService == null) {
return Connection.createFailedConnection(
new DisconnectCause(DisconnectCause.ERROR)
);
}
Account account = xmppConnectionService.findAccountByJid(Jid.of(accountJid));
Jid with = Jid.of(withJid);