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

Merge commit '852e5354f60a0131692c46f509c2e9901b0b6810'

* commit '852e5354f60a0131692c46f509c2e9901b0b6810':
  SipPhone: fix missing-call DisconnectCause feedback
This commit is contained in:
Hung-ying Tyan
2010-09-20 00:58:08 -07:00
committed by Android Git Automerger
2 changed files with 11 additions and 9 deletions

View File

@@ -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

View File

@@ -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,