Fix crash when handling expired call offers.

main
Cody Henthorne 2022-11-18 13:17:20 -05:00
rodzic 7a449a971f
commit 8a9605ade8
1 zmienionych plików z 11 dodań i 9 usunięć

Wyświetl plik

@ -681,16 +681,18 @@ public abstract class WebRtcActionProcessor {
ApplicationDependencies.getAppForegroundObserver().removeListener(webRtcInteractor.getForegroundListener());
webRtcInteractor.updatePhoneState(LockManager.PhoneState.PROCESSING);
boolean playDisconnectSound = (activePeer.getState() == CallState.DIALING) ||
(activePeer.getState() == CallState.REMOTE_RINGING) ||
(activePeer.getState() == CallState.RECEIVED_BUSY) ||
(activePeer.getState() == CallState.CONNECTED);
webRtcInteractor.stopAudio(playDisconnectSound);
if (activePeer.getState() != CallState.IDLE) {
webRtcInteractor.updatePhoneState(LockManager.PhoneState.PROCESSING);
boolean playDisconnectSound = (activePeer.getState() == CallState.DIALING) ||
(activePeer.getState() == CallState.REMOTE_RINGING) ||
(activePeer.getState() == CallState.RECEIVED_BUSY) ||
(activePeer.getState() == CallState.CONNECTED);
webRtcInteractor.stopAudio(playDisconnectSound);
webRtcInteractor.terminateCall(activePeer.getId());
webRtcInteractor.updatePhoneState(LockManager.PhoneState.IDLE);
webRtcInteractor.stopForegroundService();
webRtcInteractor.terminateCall(activePeer.getId());
webRtcInteractor.updatePhoneState(LockManager.PhoneState.IDLE);
webRtcInteractor.stopForegroundService();
}
return WebRtcVideoUtil.deinitializeVideo(currentState)
.builder()