From 5aa64641d281fc225412c28aae0feeb043ae416f Mon Sep 17 00:00:00 2001 From: Curt Brune Date: Fri, 14 Feb 2020 08:04:09 -0800 Subject: [PATCH] Convert IllegalStateException to warning log in receivedBusy() This is not a fatal condition. Convert to warning log message in order to gather more information. --- .../java/org/thoughtcrime/securesms/ringrtc/RemotePeer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ringrtc/RemotePeer.java b/app/src/main/java/org/thoughtcrime/securesms/ringrtc/RemotePeer.java index cc1dffc4ca..9106fb108e 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ringrtc/RemotePeer.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ringrtc/RemotePeer.java @@ -6,6 +6,7 @@ import androidx.annotation.NonNull; import org.signal.ringrtc.CallId; import org.signal.ringrtc.Remote; +import org.thoughtcrime.securesms.logging.Log; import org.thoughtcrime.securesms.recipients.Recipient; import org.thoughtcrime.securesms.recipients.RecipientId; @@ -17,6 +18,8 @@ import org.thoughtcrime.securesms.recipients.RecipientId; */ public final class RemotePeer implements Remote, Parcelable { + private static final String TAG = Log.tag(RemotePeer.class); + @NonNull private final RecipientId recipientId; @NonNull private CallState callState; @NonNull private CallId callId; @@ -98,7 +101,7 @@ public final class RemotePeer implements Remote, Parcelable public void receivedBusy() { if (callState != CallState.DIALING) { - throw new IllegalStateException("Cannot transition to RECEIVED_BUSY from state: " + callState); + Log.w(TAG, "RECEIVED_BUSY from unexpected state: " + callState); } this.callState = CallState.RECEIVED_BUSY;