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

Commit e589ac93 authored by Anthony Lee's avatar Anthony Lee Committed by Android (Google) Code Review
Browse files

Merge "Change conference connect time to ignore undefined connect times." into mnc-dev

parents 1d744e15 7ee3f31d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -237,6 +237,8 @@ public class ImsPhoneCall extends Call {
            long conferenceConnectTime = imsPhoneConnection.getConferenceConnectTime();
            if (conferenceConnectTime > 0) {
                imsPhoneConnection.setConnectTime(conferenceConnectTime);
            } else {
                Rlog.d(LOG_TAG, "merge: conference connect time is 0");
            }
        }
        Rlog.d(LOG_TAG, "merge: " + that + "state = " + state);
+15 −2
Original line number Diff line number Diff line
@@ -533,8 +533,21 @@ public final class ImsPhoneCallTracker extends CallTracker {

        // Keep track of the connect time of the earliest call so that it can be set on the
        // {@code ImsConference} when it is created.
        long conferenceConnectTime = Math.min(mForegroundCall.getEarliestConnectTime(),
        long foregroundConnectTime = mForegroundCall.getEarliestConnectTime();
        long backgroundConnectTime = mBackgroundCall.getEarliestConnectTime();
        long conferenceConnectTime;
        if (foregroundConnectTime > 0 && backgroundConnectTime > 0) {
            conferenceConnectTime = Math.min(mForegroundCall.getEarliestConnectTime(),
                    mBackgroundCall.getEarliestConnectTime());
            log("conference - using connect time = " + conferenceConnectTime);
        } else if (foregroundConnectTime > 0) {
            log("conference - bg call connect time is 0; using fg = " + foregroundConnectTime);
            conferenceConnectTime = foregroundConnectTime;
        } else {
            log("conference - fg call connect time is 0; using bg = " + backgroundConnectTime);
            conferenceConnectTime = backgroundConnectTime;
        }

        ImsPhoneConnection foregroundConnection = mForegroundCall.getFirstConnection();
        if (foregroundConnection != null) {
            foregroundConnection.setConferenceConnectTime(conferenceConnectTime);