Loading telephony/java/com/android/internal/telephony/sip/SipPhone.java +21 −11 Original line number Diff line number Diff line Loading @@ -447,6 +447,7 @@ public class SipPhone extends SipPhoneBase { if (state.isAlive()) { Log.d(LOG_TAG, "hang up call: " + getState() + ": " + this + " on phone " + getPhone()); setState(State.DISCONNECTING); CallStateException excp = null; for (Connection c : connections) { try { Loading @@ -456,7 +457,6 @@ public class SipPhone extends SipPhoneBase { } } if (excp != null) throw excp; setState(State.DISCONNECTING); } else { Log.d(LOG_TAG, "hang up dead call: " + getState() + ": " + this + " on phone " + getPhone()); Loading Loading @@ -633,13 +633,20 @@ public class SipPhone extends SipPhoneBase { } synchronized (SipPhone.class) { setState(Call.State.DISCONNECTED); mSipAudioCall.close(); mOwner.onConnectionEnded(SipConnection.this); Log.v(LOG_TAG, "-------- connection ended: " + mPeer.getUriString() + ": " + mSipAudioCall.getState() + ", cause: " + getDisconnectCause() + ", on phone " SipAudioCall sipAudioCall = mSipAudioCall; mSipAudioCall = null; String sessionState = (sipAudioCall == null) ? "" : (sipAudioCall.getState() + ", "); Log.v(LOG_TAG, "--- connection ended: " + mPeer.getUriString() + ": " + sessionState + "cause: " + getDisconnectCause() + ", on phone " + getPhone()); if (sipAudioCall != null) { sipAudioCall.setListener(null); sipAudioCall.close(); } mOwner.onConnectionEnded(SipConnection.this); } } Loading Loading @@ -793,14 +800,17 @@ public class SipPhone extends SipPhoneBase { synchronized (SipPhone.class) { Log.v(LOG_TAG, "hangup conn: " + mPeer.getUriString() + ": " + mState + ": on phone " + getPhone().getPhoneName()); if (!mState.isAlive()) return; try { if (mState.isAlive()) { if (mSipAudioCall != null) mSipAudioCall.endCall(); setState(Call.State.DISCONNECTING); setDisconnectCause(DisconnectCause.LOCAL); SipAudioCall sipAudioCall = mSipAudioCall; if (sipAudioCall != null) { sipAudioCall.setListener(null); sipAudioCall.endCall(); } } catch (SipException e) { throw new CallStateException("hangup(): " + e); } finally { mAdapter.onCallEnded(DisconnectCause.LOCAL); } } } Loading Loading
telephony/java/com/android/internal/telephony/sip/SipPhone.java +21 −11 Original line number Diff line number Diff line Loading @@ -447,6 +447,7 @@ public class SipPhone extends SipPhoneBase { if (state.isAlive()) { Log.d(LOG_TAG, "hang up call: " + getState() + ": " + this + " on phone " + getPhone()); setState(State.DISCONNECTING); CallStateException excp = null; for (Connection c : connections) { try { Loading @@ -456,7 +457,6 @@ public class SipPhone extends SipPhoneBase { } } if (excp != null) throw excp; setState(State.DISCONNECTING); } else { Log.d(LOG_TAG, "hang up dead call: " + getState() + ": " + this + " on phone " + getPhone()); Loading Loading @@ -633,13 +633,20 @@ public class SipPhone extends SipPhoneBase { } synchronized (SipPhone.class) { setState(Call.State.DISCONNECTED); mSipAudioCall.close(); mOwner.onConnectionEnded(SipConnection.this); Log.v(LOG_TAG, "-------- connection ended: " + mPeer.getUriString() + ": " + mSipAudioCall.getState() + ", cause: " + getDisconnectCause() + ", on phone " SipAudioCall sipAudioCall = mSipAudioCall; mSipAudioCall = null; String sessionState = (sipAudioCall == null) ? "" : (sipAudioCall.getState() + ", "); Log.v(LOG_TAG, "--- connection ended: " + mPeer.getUriString() + ": " + sessionState + "cause: " + getDisconnectCause() + ", on phone " + getPhone()); if (sipAudioCall != null) { sipAudioCall.setListener(null); sipAudioCall.close(); } mOwner.onConnectionEnded(SipConnection.this); } } Loading Loading @@ -793,14 +800,17 @@ public class SipPhone extends SipPhoneBase { synchronized (SipPhone.class) { Log.v(LOG_TAG, "hangup conn: " + mPeer.getUriString() + ": " + mState + ": on phone " + getPhone().getPhoneName()); if (!mState.isAlive()) return; try { if (mState.isAlive()) { if (mSipAudioCall != null) mSipAudioCall.endCall(); setState(Call.State.DISCONNECTING); setDisconnectCause(DisconnectCause.LOCAL); SipAudioCall sipAudioCall = mSipAudioCall; if (sipAudioCall != null) { sipAudioCall.setListener(null); sipAudioCall.endCall(); } } catch (SipException e) { throw new CallStateException("hangup(): " + e); } finally { mAdapter.onCallEnded(DisconnectCause.LOCAL); } } } Loading