~singpolyma/cheogram-android

e2f98f6bbc819bbacd96d7b4e69aef7f740de745 — Daniel Gultsch 1 year, 4 months ago 9897fa3
ensure cc-ed proceed is equivalent to accept
1 files changed, 16 insertions(+), 15 deletions(-)

M src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java
M src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java => src/main/java/eu/siacs/conversations/xmpp/jingle/JingleRtpConnection.java +16 -15
@@ 952,16 952,7 @@ public class JingleRtpConnection extends AbstractJingleConnection
                from.asBareJid().equals(id.account.getJid().asBareJid());
        if (originatedFromMyself) {
            if (transition(State.ACCEPTED)) {
                if (serverMsgId != null) {
                    this.message.setServerMsgId(serverMsgId);
                }
                this.message.setTime(timestamp);
                this.message.setCarbon(true); // indicate that call was accepted on other device
                this.writeLogMessageSuccess(0);
                this.xmppConnectionService
                        .getNotificationService()
                        .cancelIncomingCallNotification();
                this.finish();
                acceptedOnOtherDevice(serverMsgId, timestamp);
            } else {
                Log.d(
                        Config.LOGTAG,


@@ 976,6 967,19 @@ public class JingleRtpConnection extends AbstractJingleConnection
        }
    }

    private void acceptedOnOtherDevice(final String serverMsgId, final long timestamp) {
        if (serverMsgId != null) {
            this.message.setServerMsgId(serverMsgId);
        }
        this.message.setTime(timestamp);
        this.message.setCarbon(true); // indicate that call was accepted on other device
        this.writeLogMessageSuccess(0);
        this.xmppConnectionService
                .getNotificationService()
                .cancelIncomingCallNotification();
        this.finish();
    }

    private void receiveReject(final Jid from, final String serverMsgId, final long timestamp) {
        final boolean originatedFromMyself =
                from.asBareJid().equals(id.account.getJid().asBareJid());


@@ 1173,11 1177,8 @@ public class JingleRtpConnection extends AbstractJingleConnection
                        id.account.getJid().asBareJid()
                                + ": moved session with "
                                + id.with
                                + " into state accepted after received carbon copied procced");
                this.xmppConnectionService
                        .getNotificationService()
                        .cancelIncomingCallNotification();
                this.finish();
                                + " into state accepted after received carbon copied proceed");
                acceptedOnOtherDevice(serverMsgId, timestamp);
            }
        } else {
            Log.d(