summaryrefslogtreecommitdiffstats
path: root/voip
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-09-28 07:53:39 +0800
committerHung-ying Tyan <tyanh@google.com>2010-09-28 14:54:13 +0800
commit624d5b4e8c20516516d0bff74479b9f5abdfe61c (patch)
treee1557296d97610852691a55da3f094cbe7dd5fd3 /voip
parent245475925eff61ee76bde58de69253a889e39d0a (diff)
downloadframeworks_base-624d5b4e8c20516516d0bff74479b9f5abdfe61c.zip
frameworks_base-624d5b4e8c20516516d0bff74479b9f5abdfe61c.tar.gz
frameworks_base-624d5b4e8c20516516d0bff74479b9f5abdfe61c.tar.bz2
SIP: add DisconnectCause.SERVER_ERROR
and fix how SipErrorCode.SERVER_ERROR is determinted from server response, not from local exceptions. http://b/issue?id=3041332 Change-Id: Idce67e29858d5c7573b98b7fa1fac074913d71d6
Diffstat (limited to 'voip')
-rw-r--r--voip/java/com/android/server/sip/SipSessionGroup.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/voip/java/com/android/server/sip/SipSessionGroup.java b/voip/java/com/android/server/sip/SipSessionGroup.java
index 91677a2..8f9a26b 100644
--- a/voip/java/com/android/server/sip/SipSessionGroup.java
+++ b/voip/java/com/android/server/sip/SipSessionGroup.java
@@ -82,7 +82,6 @@ class SipSessionGroup implements SipListener {
private static final boolean DEBUG = true;
private static final boolean DEBUG_PING = DEBUG && false;
private static final String ANONYMOUS = "anonymous";
- private static final String SERVER_ERROR_PREFIX = "Response: ";
private static final int EXPIRY_TIME = 3600; // in seconds
private static final int CANCEL_CALL_TIMER = 3; // in seconds
@@ -1099,8 +1098,8 @@ class SipSessionGroup implements SipListener {
}
private String createErrorMessage(Response response) {
- return String.format(SERVER_ERROR_PREFIX + "%s (%d)",
- response.getReasonPhrase(), response.getStatusCode());
+ return String.format("%s (%d)", response.getReasonPhrase(),
+ response.getStatusCode());
}
private void establishCall() {
@@ -1204,8 +1203,6 @@ class SipSessionGroup implements SipListener {
return SipErrorCode.INVALID_REMOTE_URI;
} else if (exception instanceof IOException) {
return SipErrorCode.SOCKET_ERROR;
- } else if (message.startsWith(SERVER_ERROR_PREFIX)) {
- return SipErrorCode.SERVER_ERROR;
} else {
return SipErrorCode.CLIENT_ERROR;
}