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

Commit 6034f9b2 authored by Hung-ying Tyan's avatar Hung-ying Tyan Committed by Android Git Automerger
Browse files

am 06e8cdc0: Fix race between ending and answering a SIP call.

* commit '06e8cdc0':
  Fix race between ending and answering a SIP call.
parents ed34b244 06e8cdc0
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) {