Fix MT Call screen stuck issue.

The issue this change fixes can be reproduced by following steps:
    1. Originate and connect a call to remote party #1 that is not in Contacts.
    2. Receive a call from the remote party #2 that is not in Contacts, the
       call waiting tone is sounded and the call waiting screen is displayed.
    3. Press menu key and ignore the call, and the call waiting screen is
       dismissed and the remote party #2 is forwarded to voice mail.
    When we ignore the incoming call, Phone gets stuck with incoming call
    screen.

    The fix is:
    1. Update phone state promotly based on the call waiting state.
    2. Remove new call handling in handlePollCalls() function because in CDMA,
       the call drop should be determnited by the number of calls in the call
       list.
This commit is contained in:
Cheng Yang
2009-07-17 10:27:38 -07:00
committed by Wink Saville
parent f3ea3e0968
commit 84d5585b99

View File

@@ -262,6 +262,7 @@ public final class CdmaCallTracker extends CallTracker {
// triggered by updateParent.
cwConn.updateParent(ringingCall, foregroundCall);
cwConn.onConnectedInOrOut();
updatePhoneState();
switchWaitingOrHoldingAndActive();
} else {
throw new CallStateException("phone not ringing");
@@ -531,17 +532,6 @@ public final class CdmaCallTracker extends CallTracker {
// Dropped connections are removed from the CallTracker
// list but kept in the Call list
connections[i] = null;
} else if (conn != null && dc != null && !conn.compareTo(dc)) {
// Connection in CLCC response does not match what
// we were tracking. Assume dropped call and new call
droppedDuringPoll.add(conn);
connections[i] = new CdmaConnection (phone.getContext(), dc, this, i);
if (connections[i].getCall() == ringingCall) {
newRinging = connections[i];
} // else something strange happened
hasNonHangupStateChanged = true;
} else if (conn != null && dc != null) { /* implicit conn.compareTo(dc) */
boolean changed;
changed = conn.update(dc);
@@ -679,6 +669,7 @@ public final class CdmaCallTracker extends CallTracker {
// is not called here. Instead, conn.onLocalDisconnect() is called.
conn.onLocalDisconnect();
phone.notifyPreciseCallStateChanged();
updatePhoneState();
return;
} else {
try {
@@ -865,6 +856,7 @@ public final class CdmaCallTracker extends CallTracker {
// Create a new CdmaConnection which attaches itself to ringingCall.
ringingCall.setGeneric(false);
new CdmaConnection(phone.getContext(), cw, this, ringingCall);
updatePhoneState();
// Finally notify application
notifyCallWaitingInfo(cw);