catch IllegalStateException around acceptCall()

this can happen when the UI races a call retrection
This commit is contained in:
Daniel Gultsch 2020-05-05 09:37:24 +02:00
parent c159bbfc81
commit fb57ef47bc
1 changed files with 5 additions and 1 deletions

View File

@ -147,7 +147,11 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
private void checkRecorderAndAcceptCall() {
checkMicrophoneAvailability();
requireRtpConnection().acceptCall();
try {
requireRtpConnection().acceptCall();
} catch (final IllegalStateException e) {
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
private void checkMicrophoneAvailability() {