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

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

am 1738252a: am 32346522: Merge "Don\'t enter DISCONNECTING state when the...

am 1738252a: am 32346522: Merge "Don\'t enter DISCONNECTING state when the call/connection is not alive" into gingerbread

Merge commit '1738252a'

* commit '1738252a':
  Don't enter DISCONNECTING state when the call/connection is not alive
parents a2a57aa0 1738252a
Loading
Loading
Loading
Loading
+21 −14
Original line number Diff line number Diff line
@@ -444,7 +444,8 @@ public class SipPhone extends SipPhoneBase {
        @Override
        public void hangup() throws CallStateException {
            synchronized (SipPhone.class) {
                Log.v(LOG_TAG, "hang up call: " + getState() + ": " + this
                if (mState.isAlive()) {
                    Log.d(LOG_TAG, "hang up call: " + getState() + ": " + this
                            + " on phone " + getPhone());
                    CallStateException excp = null;
                    for (Connection c : connections) {
@@ -456,6 +457,10 @@ public class SipPhone extends SipPhoneBase {
                    }
                    if (excp != null) throw excp;
                    setState(State.DISCONNECTING);
                } else {
                    Log.d(LOG_TAG, "hang up dead call: " + getState() + ": "
                            + this + " on phone " + getPhone());
                }
            }
        }

@@ -787,11 +792,13 @@ public class SipPhone extends SipPhoneBase {
        public void hangup() throws CallStateException {
            synchronized (SipPhone.class) {
                Log.v(LOG_TAG, "hangup conn: " + mPeer.getUriString() + ": "
                        + ": on phone " + getPhone().getPhoneName());
                        + mState + ": on phone " + getPhone().getPhoneName());
                try {
                    if (mState.isAlive()) {
                        if (mSipAudioCall != null) mSipAudioCall.endCall();
                        setState(Call.State.DISCONNECTING);
                        setDisconnectCause(DisconnectCause.LOCAL);
                    }
                } catch (SipException e) {
                    throw new CallStateException("hangup(): " + e);
                }