Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76876caf authored by Mengjun Leng's avatar Mengjun Leng Committed by Linux Build Service Account
Browse files

Expedite the processing of destroying Incall UI after end call

1. Start the processing of destroying UI at disconnecting state
instead of disconnected state.
2. Reduce delay to post message for destroying.

Change-Id: I1e42bccd71a4e23821da07534a14b286aee9c1ab
CRs-Fixed: 1034513
parent d9171594
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -538,7 +538,8 @@ public class CallList {

        boolean updated = false;

        if (call.getState() == Call.State.DISCONNECTED) {
        if (call.getState() == Call.State.DISCONNECTING
                || call.getState() == Call.State.DISCONNECTED) {
            // update existing (but do not add!!) disconnected calls
            if (mCallById.containsKey(call.getId())) {
                // For disconnected calls, we want to keep them alive for a few seconds so that the
@@ -567,8 +568,8 @@ public class CallList {
    }

    private int getDelayForDisconnect(Call call) {
        Preconditions.checkState(call.getState() == Call.State.DISCONNECTED);

        Preconditions.checkState(call.getState() == Call.State.DISCONNECTED
                || call.getState() == Call.State.DISCONNECTING);

        final int cause = call.getDisconnectCause().getCode();
        final int delay;
@@ -583,6 +584,7 @@ public class CallList {
            case DisconnectCause.REJECTED:
            case DisconnectCause.MISSED:
            case DisconnectCause.CANCELED:
            case DisconnectCause.UNKNOWN:
                // no delay for missed/rejected incoming calls and canceled outgoing calls.
                delay = 0;
                break;