diff options
Diffstat (limited to 'voip/java/com/android/server/sip/SipService.java')
-rw-r--r-- | voip/java/com/android/server/sip/SipService.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/voip/java/com/android/server/sip/SipService.java b/voip/java/com/android/server/sip/SipService.java index a7c61e5..d8a1572 100644 --- a/voip/java/com/android/server/sip/SipService.java +++ b/voip/java/com/android/server/sip/SipService.java @@ -825,11 +825,13 @@ public final class SipService extends ISipService.Stub { synchronized (SipService.this) { if (notCurrentSession(session)) return; - if (errorCode == SipErrorCode.INVALID_CREDENTIALS) { - if (DEBUG) Log.d(TAG, " pause auto-registration"); - stop(); - } else { - onError(); + switch (errorCode) { + case SipErrorCode.INVALID_CREDENTIALS: + case SipErrorCode.SERVER_UNREACHABLE: + if (DEBUG) Log.d(TAG, " pause auto-registration"); + stop(); + default: + restartLater(); } mErrorCode = errorCode; @@ -846,11 +848,11 @@ public final class SipService extends ISipService.Stub { mErrorCode = SipErrorCode.TIME_OUT; mProxy.onRegistrationTimeout(session); - onError(); + restartLater(); } } - private void onError() { + private void restartLater() { mRegistered = false; restart(backoffDuration()); if (mKeepAliveProcess != null) { |