Use StatusHint label to signal connecting state

This commit is contained in:
Peter Cai 2022-04-21 21:23:14 -04:00
parent 3ee45952fc
commit 31c627135c

View file

@ -235,7 +235,7 @@ public class ConnectionService extends android.telecom.ConnectionService {
findRtpConnection(); findRtpConnection();
} }
setStatusHints(new StatusHints(null, gatewayIcon, null)); String statusLabel = null;
if (state == RtpEndUserState.FINDING_DEVICE) { if (state == RtpEndUserState.FINDING_DEVICE) {
setInitialized(); setInitialized();
@ -246,6 +246,7 @@ public class ConnectionService extends android.telecom.ConnectionService {
} else if (state == RtpEndUserState.CONNECTING) { } else if (state == RtpEndUserState.CONNECTING) {
xmppConnectionService.setDiallerIntegrationActive(true); xmppConnectionService.setDiallerIntegrationActive(true);
setActive(); setActive();
statusLabel = getString(R.string.rtp_state_connecting);
} else if (state == RtpEndUserState.CONNECTED) { } else if (state == RtpEndUserState.CONNECTED) {
postDial(); postDial();
} else if (state == RtpEndUserState.DECLINED_OR_BUSY) { } else if (state == RtpEndUserState.DECLINED_OR_BUSY) {
@ -257,6 +258,8 @@ public class ConnectionService extends android.telecom.ConnectionService {
} else if (RtpSessionActivity.END_CARD.contains(state)) { } else if (RtpSessionActivity.END_CARD.contains(state)) {
close(new DisconnectCause(DisconnectCause.ERROR)); close(new DisconnectCause(DisconnectCause.ERROR));
} }
setStatusHints(new StatusHints(statusLabel, gatewayIcon, null));
} }
@Override @Override