am 1738252a: am 32346522: Merge "Don\'t enter DISCONNECTING state when the call/connection is not alive" into gingerbread
Merge commit '1738252a596c71851cabf5835acb3584ad6b3191' * commit '1738252a596c71851cabf5835acb3584ad6b3191': Don't enter DISCONNECTING state when the call/connection is not alive
This commit is contained in:
@@ -444,18 +444,23 @@ public class SipPhone extends SipPhoneBase {
|
||||
@Override
|
||||
public void hangup() throws CallStateException {
|
||||
synchronized (SipPhone.class) {
|
||||
Log.v(LOG_TAG, "hang up call: " + getState() + ": " + this
|
||||
+ " on phone " + getPhone());
|
||||
CallStateException excp = null;
|
||||
for (Connection c : connections) {
|
||||
try {
|
||||
c.hangup();
|
||||
} catch (CallStateException e) {
|
||||
excp = e;
|
||||
if (mState.isAlive()) {
|
||||
Log.d(LOG_TAG, "hang up call: " + getState() + ": " + this
|
||||
+ " on phone " + getPhone());
|
||||
CallStateException excp = null;
|
||||
for (Connection c : connections) {
|
||||
try {
|
||||
c.hangup();
|
||||
} catch (CallStateException e) {
|
||||
excp = e;
|
||||
}
|
||||
}
|
||||
if (excp != null) throw excp;
|
||||
setState(State.DISCONNECTING);
|
||||
} else {
|
||||
Log.d(LOG_TAG, "hang up dead call: " + getState() + ": "
|
||||
+ this + " on phone " + getPhone());
|
||||
}
|
||||
if (excp != null) throw excp;
|
||||
setState(State.DISCONNECTING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -787,11 +792,13 @@ public class SipPhone extends SipPhoneBase {
|
||||
public void hangup() throws CallStateException {
|
||||
synchronized (SipPhone.class) {
|
||||
Log.v(LOG_TAG, "hangup conn: " + mPeer.getUriString() + ": "
|
||||
+ ": on phone " + getPhone().getPhoneName());
|
||||
+ mState + ": on phone " + getPhone().getPhoneName());
|
||||
try {
|
||||
if (mSipAudioCall != null) mSipAudioCall.endCall();
|
||||
setState(Call.State.DISCONNECTING);
|
||||
setDisconnectCause(DisconnectCause.LOCAL);
|
||||
if (mState.isAlive()) {
|
||||
if (mSipAudioCall != null) mSipAudioCall.endCall();
|
||||
setState(Call.State.DISCONNECTING);
|
||||
setDisconnectCause(DisconnectCause.LOCAL);
|
||||
}
|
||||
} catch (SipException e) {
|
||||
throw new CallStateException("hangup(): " + e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user