SIP: remove dependency on javax.sip.SipException.

Change-Id: I77d289bef1b5e7f1ec0c0408d0bbf96c21085cd7
This commit is contained in:
Hung-ying Tyan
2010-09-13 16:50:12 +08:00
parent c891d2b352
commit 25b52a2f97
6 changed files with 41 additions and 10 deletions

View File

@@ -26,7 +26,6 @@ import android.net.sip.SipManager;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.sip.SipException;
abstract class SipCallBase extends Call {
private static final int MAX_CONNECTIONS_PER_CALL = 5;

View File

@@ -24,6 +24,7 @@ import android.net.rtp.AudioGroup;
import android.net.rtp.AudioStream;
import android.net.sip.SipAudioCall;
import android.net.sip.SipErrorCode;
import android.net.sip.SipException;
import android.net.sip.SipManager;
import android.net.sip.SipProfile;
import android.net.sip.SipSessionState;
@@ -67,8 +68,6 @@ import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import javax.sip.SipException;
/**
* {@hide}
*/

View File

@@ -20,8 +20,6 @@ import android.net.rtp.AudioGroup;
import android.net.rtp.AudioStream;
import android.os.Message;
import javax.sip.SipException;
/**
* Interface for making audio calls over SIP.
* @hide

View File

@@ -43,7 +43,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sdp.SdpException;
import javax.sip.SipException;
/**
* Class that handles an audio call over SIP.

View File

@@ -0,0 +1,37 @@
/*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.net.sip;
/**
* @hide
*/
public class SipException extends Exception {
public SipException() {
}
public SipException(String message) {
super(message);
}
public SipException(String message, Throwable cause) {
// we want to eliminate the dependency on javax.sip.SipException
super(message, ((cause instanceof javax.sip.SipException)
&& (cause.getCause() != null))
? cause.getCause()
: cause);
}
}

View File

@@ -25,7 +25,6 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import java.text.ParseException;
import javax.sip.SipException;
/**
* The class provides API for various SIP related tasks. Specifically, the API
@@ -501,15 +500,15 @@ public class SipManager {
}
@Override
public void onRegistrationFailed(ISipSession session, String className,
public void onRegistrationFailed(ISipSession session, String errorCode,
String message) {
mListener.onRegistrationFailed(getUri(session), className, message);
mListener.onRegistrationFailed(getUri(session), errorCode, message);
}
@Override
public void onRegistrationTimeout(ISipSession session) {
mListener.onRegistrationFailed(getUri(session),
SipException.class.getName(), "registration timed out");
SipErrorCode.TIME_OUT.toString(), "registration timed out");
}
}
}