From 3ee45952fc398d93ba71e66b7980f9fdcc8eec69 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Thu, 21 Apr 2022 17:14:14 -0400 Subject: [PATCH] set in-call UI active in the connecting state Currently, if the "CONNECTING" stage of a Jingle call takes a significant amount of time (say, a second), then there will be a window where the call is already accepted but the ringing UI is still showing. This 1) is confusing; 2) allows the user to accept a call twice, which will cause a crash. Unfortunately, there is no native equivalent to the "CONNECTING" state. The only sane choice here seems to be showing the in-call UI even if the call is still connecting. --- src/cheogram/java/com/cheogram/android/ConnectionService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cheogram/java/com/cheogram/android/ConnectionService.java b/src/cheogram/java/com/cheogram/android/ConnectionService.java index 64128fac3..8a68aadd2 100644 --- a/src/cheogram/java/com/cheogram/android/ConnectionService.java +++ b/src/cheogram/java/com/cheogram/android/ConnectionService.java @@ -243,10 +243,10 @@ public class ConnectionService extends android.telecom.ConnectionService { setDialing(); } else if (state == RtpEndUserState.INCOMING_CALL) { setRinging(); - } else if (state == RtpEndUserState.CONNECTED) { + } else if (state == RtpEndUserState.CONNECTING) { xmppConnectionService.setDiallerIntegrationActive(true); setActive(); - + } else if (state == RtpEndUserState.CONNECTED) { postDial(); } else if (state == RtpEndUserState.DECLINED_OR_BUSY) { close(new DisconnectCause(DisconnectCause.BUSY));