diff options
Diffstat (limited to 'src/com/android/server/telecom/CallsManager.java')
-rw-r--r-- | src/com/android/server/telecom/CallsManager.java | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/src/com/android/server/telecom/CallsManager.java b/src/com/android/server/telecom/CallsManager.java index c44e4fab..6cb08b2b 100644 --- a/src/com/android/server/telecom/CallsManager.java +++ b/src/com/android/server/telecom/CallsManager.java @@ -257,6 +257,7 @@ public class CallsManager extends Call.ListenerBase private final DefaultDialerCache mDefaultDialerCache; private final Timeouts.Adapter mTimeoutsAdapter; private final PhoneNumberUtilsAdapter mPhoneNumberUtilsAdapter; + private final ClockProxy mClockProxy; private final Set<Call> mLocallyDisconnectingCalls = new HashSet<>(); private final Set<Call> mPendingCallsToDisconnect = new HashSet<>(); /* Handler tied to thread in which CallManager was initialized. */ @@ -306,7 +307,8 @@ public class CallsManager extends Call.ListenerBase AsyncRingtonePlayer asyncRingtonePlayer, PhoneNumberUtilsAdapter phoneNumberUtilsAdapter, EmergencyCallHelper emergencyCallHelper, - InCallTonePlayer.ToneGeneratorFactory toneGeneratorFactory) { + InCallTonePlayer.ToneGeneratorFactory toneGeneratorFactory, + ClockProxy clockProxy) { mContext = context; mLock = lock; mPhoneNumberUtilsAdapter = phoneNumberUtilsAdapter; @@ -370,6 +372,7 @@ public class CallsManager extends Call.ListenerBase mConnectionServiceRepository = new ConnectionServiceRepository(mPhoneAccountRegistrar, mContext, mLock, this); mInCallWakeLockController = inCallWakeLockControllerFactory.create(context, this); + mClockProxy = clockProxy; mListeners.add(mInCallWakeLockController); mListeners.add(statusBarNotifier); @@ -833,8 +836,8 @@ public class CallsManager extends Call.ListenerBase phoneAccountHandle, Call.CALL_DIRECTION_INCOMING /* callDirection */, false /* forceAttachToExistingConnection */, - false /* isConference */ - ); + false, /* isConference */ + mClockProxy); // Ensure new calls related to self-managed calls/connections are set as such. This will // be overridden when the actual connection is returned in startCreateConnection, however @@ -967,8 +970,8 @@ public class CallsManager extends Call.ListenerBase // Use onCreateIncomingConnection in TelephonyConnectionService, so that we attach // to the existing connection instead of trying to create a new one. true /* forceAttachToExistingConnection */, - false /* isConference */ - ); + false, /* isConference */ + mClockProxy); call.initAnalytics(); setIntentExtrasAndStartTime(call, extras); @@ -1047,8 +1050,8 @@ public class CallsManager extends Call.ListenerBase null /* phoneAccountHandle */, Call.CALL_DIRECTION_OUTGOING /* callDirection */, false /* forceAttachToExistingConnection */, - false /* isConference */ - ); + false, /* isConference */ + mClockProxy); call.initAnalytics(); // Ensure new calls related to self-managed calls/connections are set as such. This @@ -2023,6 +2026,10 @@ public class CallsManager extends Call.ListenerBase parcelableConference.getConnectTimeMillis() == Conference.CONNECT_TIME_NOT_SPECIFIED ? 0 : parcelableConference.getConnectTimeMillis(); + long connectElapsedTime = + parcelableConference.getConnectElapsedTimeMillis() == + Conference.CONNECT_TIME_NOT_SPECIFIED ? 0 : + parcelableConference.getConnectElapsedTimeMillis(); Call call = new Call( callId, @@ -2040,7 +2047,9 @@ public class CallsManager extends Call.ListenerBase Call.CALL_DIRECTION_UNDEFINED /* callDirection */, false /* forceAttachToExistingConnection */, true /* isConference */, - connectTime); + connectTime, + connectElapsedTime, + mClockProxy); setCallState(call, Call.getStateFromConnectionState(parcelableConference.getState()), "new conference call"); @@ -2707,7 +2716,9 @@ public class CallsManager extends Call.ListenerBase Call.CALL_DIRECTION_UNDEFINED /* callDirection */, false /* forceAttachToExistingConnection */, isDowngradedConference /* isConference */, - connection.getConnectTimeMillis() /* connectTimeMillis */); + connection.getConnectTimeMillis() /* connectTimeMillis */, + connection.getConnectElapsedTimeMillis(), /* connectElapsedTimeMillis */ + mClockProxy); call.initAnalytics(); call.getAnalytics().setCreatedFromExistingConnection(true); |