From c76ca765c3ee306ed2ccdc0a71e79e1dcc028715 Mon Sep 17 00:00:00 2001 From: Sailesh Nepal Date: Thu, 14 Apr 2016 20:38:40 -0700 Subject: Add LatencyReport for every call [This is a manual cherry pick from ub-contactsdialer-b-dev.] This CL tracks latency for all incoming and outgoing calls. We now measure the following latency values: - time for a connection service to add a call to telecom. - time for telecom to process a call - time for the dialer app to launch and have a call added to it by telecom. - time for dialer to check if a call should be blocked. - time to show a notification about the call (incoming only) - time it took to show the InCallUI (only if HUN wasn't displayed) Change-Id: I08685d312cbaefc564feb4119350da71df9b9e6c --- src/com/android/dialer/util/IntentUtil.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/com') diff --git a/src/com/android/dialer/util/IntentUtil.java b/src/com/android/dialer/util/IntentUtil.java index 5a4a80bb1..581e10da4 100644 --- a/src/com/android/dialer/util/IntentUtil.java +++ b/src/com/android/dialer/util/IntentUtil.java @@ -19,6 +19,7 @@ package com.android.dialer.util; import android.content.Intent; import android.net.Uri; import android.os.Bundle; +import android.os.SystemClock; import android.provider.ContactsContract; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; @@ -37,6 +38,8 @@ public class IntentUtil { public static final String EXTRA_CALL_INITIATION_TYPE = "com.android.dialer.EXTRA_CALL_INITIATION_TYPE"; + public static final String EXTRA_CALL_CREATED_TIME_MILLIS = + "android.telecom.extra.CALL_CREATED_TIME_MILLIS"; public static class CallIntentBuilder { private Uri mUri; @@ -91,6 +94,7 @@ public class IntentUtil { intent.putExtra(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, videoState); final Bundle b = new Bundle(); + b.putLong(EXTRA_CALL_CREATED_TIME_MILLIS, SystemClock.elapsedRealtime()); b.putInt(EXTRA_CALL_INITIATION_TYPE, callIntiationType); intent.putExtra(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS, b); -- cgit v1.2.3