Skip to content

Commit

Permalink
Clear sticky WebRtcViewModel events when initiating a new call.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-signal authored and greyson-signal committed May 29, 2020
1 parent 903c398 commit d2bf539
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ private void handleOutgoingCall(Intent intent) {
}

Log.i(TAG, "handleOutgoingCall():");
EventBus.getDefault().removeStickyEvent(WebRtcViewModel.class);

initializeVideo();

Expand Down Expand Up @@ -1042,6 +1043,12 @@ private void handleEndedReceivedOfferWhileActive(Intent intent) {
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;
Expand Down

0 comments on commit d2bf539

Please sign in to comment.