Clear sticky WebRtcViewModel events when initiating a new call.

master
Alex Hart 2020-05-28 09:09:23 -03:00 committed by Greyson Parrelli
parent 903c3989b9
commit d2bf539504
1 changed files with 7 additions and 0 deletions

View File

@ -431,6 +431,7 @@ public class WebRtcCallService extends Service implements CallManager.Observer,
}
Log.i(TAG, "handleOutgoingCall():");
EventBus.getDefault().removeStickyEvent(WebRtcViewModel.class);
initializeVideo();
@ -1042,6 +1043,12 @@ public class WebRtcCallService extends Service implements CallManager.Observer,
RemotePeer remotePeer = getRemotePeer(intent);
Log.i(TAG, "handleEndedReceivedOfferWhileActive(): call_id: " + remotePeer.getCallId());
if (activePeer == null) {
Log.w(TAG, "handleEndedReceivedOfferWhileActive(): ignoring call with null activePeer");
return;
}
switch (activePeer.getState()) {
case DIALING:
case REMOTE_RINGING: setCallInProgressNotification(TYPE_OUTGOING_RINGING, activePeer); break;