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

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

am 852e5354: am 8544560c: SipPhone: fix missing-call DisconnectCause feedback

Merge commit '852e5354'

* commit '852e5354':
  SipPhone: fix missing-call DisconnectCause feedback
parents 23fd61b1 852e5354
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -822,7 +822,9 @@ public class SipPhone extends SipPhoneBase {

        @Override
        public void onCallEnded(SipAudioCall call) {
            onCallEnded(Connection.DisconnectCause.NORMAL);
            onCallEnded(call.isInCall()
                    ? Connection.DisconnectCause.NORMAL
                    : Connection.DisconnectCause.INCOMING_MISSED);
        }

        @Override
+8 −8
Original line number Diff line number Diff line
@@ -266,7 +266,6 @@ public class SipAudioCallImpl extends SipSessionAdapter
    @Override
    public void onCallEnded(ISipSession session) {
        Log.d(TAG, "sip call ended: " + session);
        close();
        Listener listener = mListener;
        if (listener != null) {
            try {
@@ -275,12 +274,12 @@ public class SipAudioCallImpl extends SipSessionAdapter
                Log.e(TAG, "onCallEnded()", t);
            }
        }
        close();
    }

    @Override
    public void onCallBusy(ISipSession session) {
        Log.d(TAG, "sip call busy: " + session);
        close(false);
        Listener listener = mListener;
        if (listener != null) {
            try {
@@ -289,6 +288,7 @@ public class SipAudioCallImpl extends SipSessionAdapter
                Log.e(TAG, "onCallBusy()", t);
            }
        }
        close(false);
    }

    @Override
@@ -313,12 +313,6 @@ public class SipAudioCallImpl extends SipSessionAdapter
                + ": " + message);
        mErrorCode = errorCode;
        mErrorMessage = message;
        synchronized (this) {
            if ((mErrorCode == SipErrorCode.DATA_CONNECTION_LOST)
                    || !isInCall()) {
                close(true);
            }
        }
        Listener listener = mListener;
        if (listener != null) {
            try {
@@ -327,6 +321,12 @@ public class SipAudioCallImpl extends SipSessionAdapter
                Log.e(TAG, "onError()", t);
            }
        }
        synchronized (this) {
            if ((errorCode == SipErrorCode.DATA_CONNECTION_LOST)
                    || !isInCall()) {
                close(true);
            }
        }
    }

    public synchronized void attachCall(ISipSession session,