summaryrefslogtreecommitdiffstats
path: root/voip
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-09-14 19:33:10 +0800
committerHung-ying Tyan <tyanh@google.com>2010-09-15 00:49:02 +0800
commit12bec5ddf58ad3a69728810480e6194c806567d6 (patch)
tree31434b9f5ba4004382c7543cb679d2967794b66d /voip
parent13f6270eb14b409709c936b828e2a2fd40e427c4 (diff)
downloadframeworks_base-12bec5ddf58ad3a69728810480e6194c806567d6.zip
frameworks_base-12bec5ddf58ad3a69728810480e6194c806567d6.tar.gz
frameworks_base-12bec5ddf58ad3a69728810480e6194c806567d6.tar.bz2
SipService: ignore connect event for non-active networks.
+ sanity check and remove redundant code. Change-Id: I4d3e226851ad7fc4d88ddcd0a5c58f7e33b6c14a
Diffstat (limited to 'voip')
-rw-r--r--voip/java/android/net/sip/SipAudioCallImpl.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/voip/java/android/net/sip/SipAudioCallImpl.java b/voip/java/android/net/sip/SipAudioCallImpl.java
index 484eb1e..8bf486a 100644
--- a/voip/java/android/net/sip/SipAudioCallImpl.java
+++ b/voip/java/android/net/sip/SipAudioCallImpl.java
@@ -184,7 +184,7 @@ public class SipAudioCallImpl extends SipSessionAdapter
Listener listener = mListener;
if (listener != null) {
try {
- listener.onCalling(SipAudioCallImpl.this);
+ listener.onCalling(this);
} catch (Throwable t) {
Log.e(TAG, "onCalling()", t);
}
@@ -198,7 +198,7 @@ public class SipAudioCallImpl extends SipSessionAdapter
Listener listener = mListener;
if (listener != null) {
try {
- listener.onRingingBack(SipAudioCallImpl.this);
+ listener.onRingingBack(this);
} catch (Throwable t) {
Log.e(TAG, "onRingingBack()", t);
}
@@ -251,9 +251,9 @@ public class SipAudioCallImpl extends SipSessionAdapter
if (listener != null) {
try {
if (mHold) {
- listener.onCallHeld(SipAudioCallImpl.this);
+ listener.onCallHeld(this);
} else {
- listener.onCallEstablished(SipAudioCallImpl.this);
+ listener.onCallEstablished(this);
}
} catch (Throwable t) {
Log.e(TAG, "onCallEstablished()", t);
@@ -268,7 +268,7 @@ public class SipAudioCallImpl extends SipSessionAdapter
Listener listener = mListener;
if (listener != null) {
try {
- listener.onCallEnded(SipAudioCallImpl.this);
+ listener.onCallEnded(this);
} catch (Throwable t) {
Log.e(TAG, "onCallEnded()", t);
}
@@ -282,7 +282,7 @@ public class SipAudioCallImpl extends SipSessionAdapter
Listener listener = mListener;
if (listener != null) {
try {
- listener.onCallBusy(SipAudioCallImpl.this);
+ listener.onCallBusy(this);
} catch (Throwable t) {
Log.e(TAG, "onCallBusy()", t);
}
@@ -302,7 +302,7 @@ public class SipAudioCallImpl extends SipSessionAdapter
Listener listener = mListener;
if (listener != null) {
try {
- listener.onError(SipAudioCallImpl.this, mErrorCode, message);
+ listener.onError(this, mErrorCode, message);
} catch (Throwable t) {
Log.e(TAG, "onCallBusy()", t);
}
@@ -310,9 +310,10 @@ public class SipAudioCallImpl extends SipSessionAdapter
}
@Override
- public void onError(ISipSession session, String errorCode, String message) {
- Log.d(TAG, "sip session error: " + errorCode + ": " + message);
- mErrorCode = getErrorCode(errorCode);
+ public void onError(ISipSession session, String errorCodeString,
+ String message) {
+ Log.d(TAG, "sip session error: " + errorCodeString + ": " + message);
+ SipErrorCode errorCode = mErrorCode = getErrorCode(errorCodeString);
mErrorMessage = message;
synchronized (this) {
if ((mErrorCode == SipErrorCode.DATA_CONNECTION_LOST)
@@ -323,7 +324,7 @@ public class SipAudioCallImpl extends SipSessionAdapter
Listener listener = mListener;
if (listener != null) {
try {
- listener.onError(SipAudioCallImpl.this, mErrorCode, message);
+ listener.onError(this, errorCode, message);
} catch (Throwable t) {
Log.e(TAG, "onError()", t);
}