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

View file

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