don’t throw when user double taps accept button

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java | 7 
1 file changed, 7 insertions(+)

Detailed changes

src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java 🔗

@@ -789,6 +789,13 @@ public class JingleRtpConnection extends AbstractJingleConnection implements Web
             case SESSION_INITIALIZED:
                 acceptCallFromSessionInitialized();
                 break;
+            case ACCEPTED:
+                Log.w(Config.LOGTAG,id.account.getJid().asBareJid()+": the call has already been accepted  with another client. UI was just lagging behind");
+                break;
+            case PROCEED:
+            case SESSION_ACCEPTED:
+                Log.w(Config.LOGTAG,id.account.getJid().asBareJid()+": the call has already been accepted. user probably double tapped the UI");
+                break;
             default:
                 throw new IllegalStateException("Can not accept call from " + this.state);
         }