summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/Call.java
diff options
context:
space:
mode:
authorSailesh Nepal <sail@google.com>2016-04-14 20:38:40 -0700
committerSailesh Nepal <sail@google.com>2016-04-29 15:50:16 -0700
commitc76ca765c3ee306ed2ccdc0a71e79e1dcc028715 (patch)
tree104758ec1cb087e1c75f8f6bb52d858d1c7481e4 /InCallUI/src/com/android/incallui/Call.java
parent8f9164c4072f680b68e7abe0c433300d032d66f4 (diff)
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
Diffstat (limited to 'InCallUI/src/com/android/incallui/Call.java')
-rw-r--r--InCallUI/src/com/android/incallui/Call.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/InCallUI/src/com/android/incallui/Call.java b/InCallUI/src/com/android/incallui/Call.java
index 252c7016d..1ad37e01a 100644
--- a/InCallUI/src/com/android/incallui/Call.java
+++ b/InCallUI/src/com/android/incallui/Call.java
@@ -375,7 +375,8 @@ public class Call {
}
};
- private android.telecom.Call mTelecomCall;
+ private final android.telecom.Call mTelecomCall;
+ private final LatencyReport mLatencyReport;
private boolean mIsEmergencyCall;
private Uri mHandle;
private final String mId;
@@ -408,7 +409,7 @@ public class Call {
private long mTimeAddedMs;
- private LogState mLogState = new LogState();
+ private final LogState mLogState = new LogState();
/**
* Used only to create mock calls for testing
@@ -416,6 +417,7 @@ public class Call {
@NeededForTesting
Call(int state) {
mTelecomCall = null;
+ mLatencyReport = new LatencyReport();
mId = ID_PREFIX + Integer.toString(sIdCounter++);
setState(state);
}
@@ -424,8 +426,8 @@ public class Call {
* Creates a new instance of a {@link Call}. Registers a callback for
* {@link android.telecom.Call} events.
*/
- public Call(android.telecom.Call telecomCall) {
- this(telecomCall, true /* registerCallback */);
+ public Call(android.telecom.Call telecomCall, LatencyReport latencyReport) {
+ this(telecomCall, latencyReport, true /* registerCallback */);
}
/**
@@ -435,8 +437,10 @@ public class Call {
* Intended for use when creating a {@link Call} instance for use with the
* {@link ContactInfoCache}, where we do not want to register callbacks for the new call.
*/
- public Call(android.telecom.Call telecomCall, boolean registerCallback) {
+ public Call(android.telecom.Call telecomCall, LatencyReport latencyReport,
+ boolean registerCallback) {
mTelecomCall = telecomCall;
+ mLatencyReport = latencyReport;
mId = ID_PREFIX + Integer.toString(sIdCounter++);
updateFromTelecomCall(registerCallback);
@@ -1012,4 +1016,8 @@ public class Call {
public boolean isSpam() {
return mIsSpam;
}
+
+ public LatencyReport getLatencyReport() {
+ return mLatencyReport;
+ }
}