am 25b52a2f: SIP: remove dependency on javax.sip.SipException.

Merge commit '25b52a2f97df112c2836972d0b6d9a4c7a9c4a4e' into gingerbread-plus-aosp

* commit '25b52a2f97df112c2836972d0b6d9a4c7a9c4a4e':
  SIP: remove dependency on javax.sip.SipException.
This commit is contained in:
Hung-ying Tyan
2010-09-13 02:16:52 -07:00
committed by Android Git Automerger
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.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import javax.sip.SipException;
abstract class SipCallBase extends Call { abstract class SipCallBase extends Call {
private static final int MAX_CONNECTIONS_PER_CALL = 5; 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.rtp.AudioStream;
import android.net.sip.SipAudioCall; import android.net.sip.SipAudioCall;
import android.net.sip.SipErrorCode; import android.net.sip.SipErrorCode;
import android.net.sip.SipException;
import android.net.sip.SipManager; import android.net.sip.SipManager;
import android.net.sip.SipProfile; import android.net.sip.SipProfile;
import android.net.sip.SipSessionState; import android.net.sip.SipSessionState;
@@ -67,8 +68,6 @@ import java.text.ParseException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.sip.SipException;
/** /**
* {@hide} * {@hide}
*/ */

View File

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

View File

@@ -43,7 +43,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.sdp.SdpException; import javax.sdp.SdpException;
import javax.sip.SipException;
/** /**
* Class that handles an audio call over SIP. * 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 android.os.ServiceManager;
import java.text.ParseException; import java.text.ParseException;
import javax.sip.SipException;
/** /**
* The class provides API for various SIP related tasks. Specifically, the API * The class provides API for various SIP related tasks. Specifically, the API
@@ -501,15 +500,15 @@ public class SipManager {
} }
@Override @Override
public void onRegistrationFailed(ISipSession session, String className, public void onRegistrationFailed(ISipSession session, String errorCode,
String message) { String message) {
mListener.onRegistrationFailed(getUri(session), className, message); mListener.onRegistrationFailed(getUri(session), errorCode, message);
} }
@Override @Override
public void onRegistrationTimeout(ISipSession session) { public void onRegistrationTimeout(ISipSession session) {
mListener.onRegistrationFailed(getUri(session), mListener.onRegistrationFailed(getUri(session),
SipException.class.getName(), "registration timed out"); SipErrorCode.TIME_OUT.toString(), "registration timed out");
} }
} }
} }