Mitigate PSTN callback crash when service is in background.
This commit is contained in:
parent
dfa6306b61
commit
0077b29d6e
1 changed files with 5 additions and 3 deletions
|
@ -479,12 +479,14 @@ public class WebRtcCallService extends Service implements CallManager.Observer,
|
||||||
}
|
}
|
||||||
|
|
||||||
private void hangup() {
|
private void hangup() {
|
||||||
|
if (serviceState != null && serviceState.getCallInfoState().getActivePeer() != null) {
|
||||||
Intent intent = new Intent(WebRtcCallService.this, WebRtcCallService.class);
|
Intent intent = new Intent(WebRtcCallService.this, WebRtcCallService.class);
|
||||||
intent.setAction(ACTION_LOCAL_HANGUP);
|
intent.setAction(ACTION_LOCAL_HANGUP);
|
||||||
|
|
||||||
startService(intent);
|
startService(intent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private @NonNull ListenableFutureTask<TurnServerInfoParcel> retrieveTurnServers() {
|
private @NonNull ListenableFutureTask<TurnServerInfoParcel> retrieveTurnServers() {
|
||||||
Callable<TurnServerInfoParcel> callable = () -> new TurnServerInfoParcel(accountManager.getTurnServerInfo());
|
Callable<TurnServerInfoParcel> callable = () -> new TurnServerInfoParcel(accountManager.getTurnServerInfo());
|
||||||
|
|
Loading…
Add table
Reference in a new issue