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

Commit ac19f3d1 authored by Nancy Chen's avatar Nancy Chen
Browse files

Rejected calls should be logged as "incoming" not "missed"

Changed incoming calls to log as "missed" only when they are actually
missed rather than rejected/dismissed.

Bug: 18078903
Change-Id: I304d49ef6c03ce0f79a0f1d220c3cf8da518796b
parent 7fa8a55a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -98,10 +98,10 @@ final class CallLogManager extends CallsManagerListenerBase {

    @Override
    public void onCallStateChanged(Call call, int oldState, int newState) {
        int disconnectCause = call.getDisconnectCause().getCode();
        boolean isNewlyDisconnected =
                newState == CallState.DISCONNECTED || newState == CallState.ABORTED;
        boolean isCallCanceled = isNewlyDisconnected &&
                call.getDisconnectCause().getCode() == DisconnectCause.CANCELED;
        boolean isCallCanceled = isNewlyDisconnected && disconnectCause == DisconnectCause.CANCELED;

        // Log newly disconnected calls only if:
        // 1) It was not in the "choose account" phase when disconnected
@@ -114,7 +114,7 @@ final class CallLogManager extends CallsManagerListenerBase {
            int type;
            if (!call.isIncoming()) {
                type = Calls.OUTGOING_TYPE;
            } else if (oldState == CallState.RINGING) {
            } else if (disconnectCause == DisconnectCause.MISSED) {
                type = Calls.MISSED_TYPE;
            } else {
                type = Calls.INCOMING_TYPE;