Loading voip/java/android/net/sip/SipManager.java +7 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.os.ServiceManager; import android.util.Log; import java.text.ParseException; Loading Loading @@ -83,6 +84,8 @@ public class SipManager { /** Part of the incoming call intent. */ public static final String EXTRA_OFFER_SD = "android:sipOfferSD"; private static final String TAG = "SipManager"; private ISipService mSipService; private Context mContext; Loading Loading @@ -525,8 +528,10 @@ public class SipManager { return ((session == null) ? mUri : session.getLocalProfile().getUriString()); } catch (RemoteException e) { throw new RuntimeException(e); } catch (Throwable e) { // SipService died? SIP stack died? Log.w(TAG, "getUri(): " + e); return null; } } Loading voip/java/com/android/server/sip/SipSessionGroup.java +18 −5 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import javax.sip.DialogTerminatedEvent; import javax.sip.IOExceptionEvent; import javax.sip.InvalidArgumentException; import javax.sip.ListeningPoint; import javax.sip.ObjectInUseException; import javax.sip.RequestEvent; import javax.sip.ResponseEvent; import javax.sip.ServerTransaction; Loading Loading @@ -415,10 +416,24 @@ class SipSessionGroup implements SipListener { mPeerProfile = null; mState = SipSession.State.READY_TO_CALL; mInviteReceived = null; mPeerSessionDescription = null; if (mDialog != null) mDialog.delete(); mDialog = null; try { if (mServerTransaction != null) mServerTransaction.terminate(); } catch (ObjectInUseException e) { // ignored } mServerTransaction = null; try { if (mClientTransaction != null) mClientTransaction.terminate(); } catch (ObjectInUseException e) { // ignored } mClientTransaction = null; mPeerSessionDescription = null; cancelSessionTimer(); } Loading Loading @@ -884,8 +899,8 @@ class SipSessionGroup implements SipListener { generateTag()); mDialog = mClientTransaction.getDialog(); addSipSession(this); mProxy.onCalling(this); startSessionTimer(cmd.getTimeout()); mProxy.onCalling(this); return true; } else if (evt instanceof RegisterCommand) { mState = SipSession.State.REGISTERING; Loading Loading @@ -964,8 +979,8 @@ class SipSessionGroup implements SipListener { // ring back for better UX if (mState == SipSession.State.OUTGOING_CALL) { mState = SipSession.State.OUTGOING_CALL_RING_BACK; mProxy.onRingingBack(this); cancelSessionTimer(); mProxy.onRingingBack(this); } return true; case Response.OK: Loading Loading @@ -1222,14 +1237,12 @@ class SipSessionGroup implements SipListener { } private void onRegistrationFailed(Throwable exception) { reset(); exception = getRootCause(exception); onRegistrationFailed(getErrorCode(exception), exception.toString()); } private void onRegistrationFailed(Response response) { reset(); int statusCode = response.getStatusCode(); onRegistrationFailed(getErrorCode(statusCode), createErrorMessage(response)); Loading Loading
voip/java/android/net/sip/SipManager.java +7 −2 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.os.IBinder; import android.os.Looper; import android.os.RemoteException; import android.os.ServiceManager; import android.util.Log; import java.text.ParseException; Loading Loading @@ -83,6 +84,8 @@ public class SipManager { /** Part of the incoming call intent. */ public static final String EXTRA_OFFER_SD = "android:sipOfferSD"; private static final String TAG = "SipManager"; private ISipService mSipService; private Context mContext; Loading Loading @@ -525,8 +528,10 @@ public class SipManager { return ((session == null) ? mUri : session.getLocalProfile().getUriString()); } catch (RemoteException e) { throw new RuntimeException(e); } catch (Throwable e) { // SipService died? SIP stack died? Log.w(TAG, "getUri(): " + e); return null; } } Loading
voip/java/com/android/server/sip/SipSessionGroup.java +18 −5 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import javax.sip.DialogTerminatedEvent; import javax.sip.IOExceptionEvent; import javax.sip.InvalidArgumentException; import javax.sip.ListeningPoint; import javax.sip.ObjectInUseException; import javax.sip.RequestEvent; import javax.sip.ResponseEvent; import javax.sip.ServerTransaction; Loading Loading @@ -415,10 +416,24 @@ class SipSessionGroup implements SipListener { mPeerProfile = null; mState = SipSession.State.READY_TO_CALL; mInviteReceived = null; mPeerSessionDescription = null; if (mDialog != null) mDialog.delete(); mDialog = null; try { if (mServerTransaction != null) mServerTransaction.terminate(); } catch (ObjectInUseException e) { // ignored } mServerTransaction = null; try { if (mClientTransaction != null) mClientTransaction.terminate(); } catch (ObjectInUseException e) { // ignored } mClientTransaction = null; mPeerSessionDescription = null; cancelSessionTimer(); } Loading Loading @@ -884,8 +899,8 @@ class SipSessionGroup implements SipListener { generateTag()); mDialog = mClientTransaction.getDialog(); addSipSession(this); mProxy.onCalling(this); startSessionTimer(cmd.getTimeout()); mProxy.onCalling(this); return true; } else if (evt instanceof RegisterCommand) { mState = SipSession.State.REGISTERING; Loading Loading @@ -964,8 +979,8 @@ class SipSessionGroup implements SipListener { // ring back for better UX if (mState == SipSession.State.OUTGOING_CALL) { mState = SipSession.State.OUTGOING_CALL_RING_BACK; mProxy.onRingingBack(this); cancelSessionTimer(); mProxy.onRingingBack(this); } return true; case Response.OK: Loading Loading @@ -1222,14 +1237,12 @@ class SipSessionGroup implements SipListener { } private void onRegistrationFailed(Throwable exception) { reset(); exception = getRootCause(exception); onRegistrationFailed(getErrorCode(exception), exception.toString()); } private void onRegistrationFailed(Response response) { reset(); int statusCode = response.getStatusCode(); onRegistrationFailed(getErrorCode(statusCode), createErrorMessage(response)); Loading