Handle group call creation failure.

This commit is contained in:
Cody Henthorne 2024-12-05 16:02:17 -05:00 committed by Greyson Parrelli
parent faa4208209
commit e1d4566dfd
4 changed files with 13 additions and 1 deletions

View file

@ -56,6 +56,10 @@ public class GroupNetworkUnavailableActionProcessor extends WebRtcActionProcesso
RingRtcDynamicConfiguration.shouldUseOboeAdm(),
webRtcInteractor.getGroupCallObserver());
if (groupCall == null) {
return groupCallFailure(currentState, "RingRTC did not create a group call", null);
}
return currentState.builder()
.changeCallInfoState()
.callState(WebRtcViewModel.State.NETWORK_FAILURE)

View file

@ -54,6 +54,10 @@ public class GroupPreJoinActionProcessor extends GroupActionProcessor {
RingRtcDynamicConfiguration.shouldUseOboeAdm(),
webRtcInteractor.getGroupCallObserver());
if (groupCall == null) {
return groupCallFailure(currentState, "RingRTC did not create a group call", null);
}
try {
groupCall.setOutgoingAudioMuted(true);
groupCall.setOutgoingVideoMuted(true);

View file

@ -189,6 +189,10 @@ public final class IncomingGroupCallActionProcessor extends DeviceAwareActionPro
RingRtcDynamicConfiguration.shouldUseOboeAdm(),
webRtcInteractor.getGroupCallObserver());
if (groupCall == null) {
return groupCallFailure(currentState, "RingRTC did not create a group call", null);
}
try {
groupCall.setOutgoingAudioMuted(true);
groupCall.setOutgoingVideoMuted(true);

View file

@ -850,7 +850,7 @@ public abstract class WebRtcActionProcessor {
return currentState;
}
protected @NonNull WebRtcServiceState groupCallFailure(@NonNull WebRtcServiceState currentState, @NonNull String message, @NonNull Throwable error) {
protected @NonNull WebRtcServiceState groupCallFailure(@NonNull WebRtcServiceState currentState, @NonNull String message, @Nullable Throwable error) {
Log.w(tag, "groupCallFailure(): " + message, error);
GroupCall groupCall = currentState.getCallInfoState().getGroupCall();