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.
This commit is contained in:
Peter Cai 2022-04-21 17:14:14 -04:00
parent 3e4799979e
commit 3ee45952fc
1 changed files with 2 additions and 2 deletions

View File

@ -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));