diff options
author | Hung-ying Tyan <tyanh@google.com> | 2010-09-27 11:47:42 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-27 11:47:42 -0700 |
commit | 5a474a2bb8bc23fcc8d05e8b9ec3f4306dd63db1 (patch) | |
tree | c4b45a6ecaf317b28801b103bc0d9c5577b39a61 /voip/java/android/net/sip | |
parent | 6cf8f64be3c079ef76d708a56b55a2b7ca6dbd2f (diff) | |
parent | 44669d31d1d5b094d7b7d3e393281440ea0c9536 (diff) | |
download | frameworks_base-5a474a2bb8bc23fcc8d05e8b9ec3f4306dd63db1.zip frameworks_base-5a474a2bb8bc23fcc8d05e8b9ec3f4306dd63db1.tar.gz frameworks_base-5a474a2bb8bc23fcc8d05e8b9ec3f4306dd63db1.tar.bz2 |
am 44669d31: am fd144d76: Merge "SipAudioCall: remove SipManager dependency." into gingerbread
Merge commit '44669d31d1d5b094d7b7d3e393281440ea0c9536'
* commit '44669d31d1d5b094d7b7d3e393281440ea0c9536':
SipAudioCall: remove SipManager dependency.
Diffstat (limited to 'voip/java/android/net/sip')
-rw-r--r-- | voip/java/android/net/sip/SipAudioCall.java | 16 | ||||
-rw-r--r-- | voip/java/android/net/sip/SipManager.java | 7 |
2 files changed, 12 insertions, 11 deletions
diff --git a/voip/java/android/net/sip/SipAudioCall.java b/voip/java/android/net/sip/SipAudioCall.java index 2135fcb..7c1234a 100644 --- a/voip/java/android/net/sip/SipAudioCall.java +++ b/voip/java/android/net/sip/SipAudioCall.java @@ -46,7 +46,7 @@ import java.util.Map; * Class that handles an audio call over SIP. */ /** @hide */ -public class SipAudioCall extends SipSessionAdapter { +public class SipAudioCall { private static final String TAG = SipAudioCall.class.getSimpleName(); private static final boolean RELEASE_SOCKET = true; private static final boolean DONT_RELEASE_SOCKET = false; @@ -530,7 +530,7 @@ public class SipAudioCall extends SipSessionAdapter { * will be called. * * @param callee the SIP profile to make the call to - * @param sipManager the {@link SipManager} object to help make call with + * @param sipSession the {@link SipSession} for carrying out the call * @param timeout the timeout value in seconds. Default value (defined by * SIP protocol) is used if {@code timeout} is zero or negative. * @see Listener.onError @@ -538,16 +538,12 @@ public class SipAudioCall extends SipSessionAdapter { * call */ public synchronized void makeCall(SipProfile peerProfile, - SipManager sipManager, int timeout) throws SipException { - SipSession s = mSipSession = sipManager.createSipSession( - mLocalProfile, createListener()); - if (s == null) { - throw new SipException( - "Failed to create SipSession; network available?"); - } + SipSession sipSession, int timeout) throws SipException { + mSipSession = sipSession; try { mAudioStream = new AudioStream(InetAddress.getByName(getLocalIp())); - s.makeCall(peerProfile, createOffer().encode(), timeout); + sipSession.setListener(createListener()); + sipSession.makeCall(peerProfile, createOffer().encode(), timeout); } catch (IOException e) { throw new SipException("makeCall()", e); } diff --git a/voip/java/android/net/sip/SipManager.java b/voip/java/android/net/sip/SipManager.java index 5976a04..59631c1 100644 --- a/voip/java/android/net/sip/SipManager.java +++ b/voip/java/android/net/sip/SipManager.java @@ -269,7 +269,12 @@ public class SipManager { throws SipException { SipAudioCall call = new SipAudioCall(mContext, localProfile); call.setListener(listener); - call.makeCall(peerProfile, this, timeout); + SipSession s = createSipSession(localProfile, null); + if (s == null) { + throw new SipException( + "Failed to create SipSession; network available?"); + } + call.makeCall(peerProfile, s, timeout); return call; } |