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

Commit 9ea5dcc6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "IMS: Fix call timer reset issue after SRVCC"

parents 5da43ce2 293d0a9a
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -1678,8 +1678,20 @@ public final class CallsManager extends Call.ListenerBase {
                false /* isIncoming */,
                false /* isConference */);

        setCallState(call, Call.getStateFromConnectionState(connection.getState()));
        int callState = Call.getStateFromConnectionState(connection.getState());
        Call existingCall = getFirstCallWithStateUsingSubId(
                connection.getPhoneAccount().getId(), callState);
        setCallState(call, callState);
        Log.i(this, "createCallForExistingConnection existingCall = "
                + existingCall + " new call = " + call);
        //SRVCC case, call is getting transfer. Copy connect time from existing call of same
        //state to new call in same sub.
        if ((callState == CallState.ACTIVE || callState == CallState.ON_HOLD)
                && existingCall != null) {
            call.setConnectTimeMillis(existingCall.getConnectTimeMillis());
        } else {
            call.setConnectTimeMillis(System.currentTimeMillis());
        }
        call.setCallCapabilities(connection.getCapabilities());
        call.setCallerDisplayName(connection.getCallerDisplayName(),
                connection.getCallerDisplayNamePresentation());