Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06e8cdc0 authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

Fix race between ending and answering a SIP call.

+ Also fix race between ending and changing (holding/unholding) a SIP call.
+ Remove an unused method.

Bug : 3128233

Change-Id: Ie18d8333a88f0d9906d54988243d909b58e07e4b
parent d7116ff1
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -527,6 +527,8 @@ class SipSessionGroup implements SipListener {
        }

        public void answerCall(String sessionDescription, int timeout) {
            synchronized (SipSessionGroup.this) {
                if (mPeerProfile == null) return;
                try {
                    processCommand(new MakeCallCommand(mPeerProfile,
                            sessionDescription, timeout));
@@ -534,20 +536,18 @@ class SipSessionGroup implements SipListener {
                    onError(e);
                }
            }
        }

        public void endCall() {
            doCommandAsync(END_CALL);
        }

        public void changeCall(String sessionDescription, int timeout) {
            doCommandAsync(new MakeCallCommand(mPeerProfile, sessionDescription,
                    timeout));
            synchronized (SipSessionGroup.this) {
                if (mPeerProfile == null) return;
                doCommandAsync(new MakeCallCommand(mPeerProfile,
                        sessionDescription, timeout));
            }

        public void changeCallWithTimeout(
                String sessionDescription, int timeout) {
            doCommandAsync(new MakeCallCommand(mPeerProfile, sessionDescription,
                    timeout));
        }

        public void register(int duration) {