Skip to content

Commit

Permalink
Mitigate PSTN callback crash when service is in background.
Browse files Browse the repository at this point in the history
  • Loading branch information
cody-signal committed Oct 28, 2020
1 parent dfa6306 commit 0077b29
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,10 +479,12 @@ public void onCallStateChanged(int state, @NonNull String phoneNumber) {
}

private void hangup() {
Intent intent = new Intent(WebRtcCallService.this, WebRtcCallService.class);
intent.setAction(ACTION_LOCAL_HANGUP);
if (serviceState != null && serviceState.getCallInfoState().getActivePeer() != null) {
Intent intent = new Intent(WebRtcCallService.this, WebRtcCallService.class);
intent.setAction(ACTION_LOCAL_HANGUP);

startService(intent);
startService(intent);
}
}
}

Expand Down

0 comments on commit 0077b29

Please sign in to comment.