Propagate elapsed time of conference to Telecom.
When setting the wall clock time of a conference to Telecom, also set the
elapsed time of the connection to ensure that the call/conference duration
is correct.
Test: Manual, unit
Bug: 64068300
Change-Id: I7d84e22b92a6c5ea9955b57c3c54ab32ddbecfc6
diff --git a/src/com/android/services/telephony/ImsConference.java b/src/com/android/services/telephony/ImsConference.java
index 603c3f4..06bc06f 100644
--- a/src/com/android/services/telephony/ImsConference.java
+++ b/src/com/android/services/telephony/ImsConference.java
@@ -23,8 +23,8 @@
import android.os.PersistableBundle;
import android.telecom.Conference;
import android.telecom.ConferenceParticipant;
-import android.telecom.Connection.VideoProvider;
import android.telecom.Connection;
+import android.telecom.Connection.VideoProvider;
import android.telecom.DisconnectCause;
import android.telecom.Log;
import android.telecom.PhoneAccountHandle;
@@ -269,9 +269,12 @@
// Specify the connection time of the conference to be the connection time of the original
// connection.
long connectTime = conferenceHost.getOriginalConnection().getConnectTime();
- setConnectTimeMillis(connectTime);
+ long connectElapsedTime = conferenceHost.getOriginalConnection().getConnectTimeReal();
+ setConnectionTime(connectTime);
+ setConnectionElapsedTime(connectElapsedTime);
// Set the connectTime in the connection as well.
conferenceHost.setConnectTimeMillis(connectTime);
+ conferenceHost.setConnectElapsedTimeMillis(connectElapsedTime);
mTelephonyConnectionService = telephonyConnectionService;
setConferenceHost(conferenceHost);