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

Commit 31b502cb authored by Tyler Gunn's avatar Tyler Gunn
Browse files

Fix for call timer resetting when starting IMS conference call. 2/4

- Added support in Conference for specifying the connect time when the
conference is created.

Bug: 18959443
Change-Id: Id29f7ba878610a0a4eaf7bbd592f344af4c0ffc4
parent 9a90f1dd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -175,6 +175,15 @@ public abstract class Connection {
        return mConnectTime;
    }

    /**
     * Sets the Connection connect time in currentTimeMillis() format.
     *
     * @param connectTime the new connect time.
     */
    public void setConnectTime(long connectTime) {
        mConnectTime = connectTime;
    }

    /**
     * Connection connect time in elapsedRealtime() format.
     * For outgoing calls: Begins at (DIALING|ALERTING) -> ACTIVE transition.
+8 −0
Original line number Diff line number Diff line
@@ -219,6 +219,14 @@ public class ImsPhoneCall extends Call {

    /* package */ void
    merge(ImsPhoneCall that, State state) {
        // This call is the conference host and the "that" call is the one being merged in.
        // Set the connect time to the earliest of this call and the other call.
        // This ensures that when an ImsConference is started, its start time will be when the first
        // call in the conference started.
        long earliestConnectTime = Math.min(getEarliestConnectTime(),
                that.getEarliestConnectTime());
        getFirstConnection().setConnectTime(earliestConnectTime);

        ImsPhoneConnection[] cc = that.mConnections.toArray(
                new ImsPhoneConnection[that.mConnections.size()]);
        for (ImsPhoneConnection c : cc) {