diff options
author | Hall Liu <hallliu@google.com> | 2016-09-09 16:36:14 -0700 |
---|---|---|
committer | Hall Liu <hallliu@google.com> | 2016-09-09 16:40:18 -0700 |
commit | d7fe686253f2135a948cafc776aa25db645ec27e (patch) | |
tree | 8ce246d9586c7df03c1eed95258cd9046d7dd57f /src/com/android/server/telecom/Analytics.java | |
parent | e32d0275d64d6799762dea643be3077495e04d20 (diff) | |
download | android_packages_services_Telecomm-d7fe686253f2135a948cafc776aa25db645ec27e.tar.gz android_packages_services_Telecomm-d7fe686253f2135a948cafc776aa25db645ec27e.tar.bz2 android_packages_services_Telecomm-d7fe686253f2135a948cafc776aa25db645ec27e.zip |
Add connection properties to analytics
Adds a record of which android.telecom.Connection properties were set on
a call during its lifetime. Also adds a test to verify that this behaves
correctly.
Change-Id: I1a5bc61228cbd676b8de218d503b30e8a76bfce2
Fix: 31395995
Diffstat (limited to 'src/com/android/server/telecom/Analytics.java')
-rw-r--r-- | src/com/android/server/telecom/Analytics.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/com/android/server/telecom/Analytics.java b/src/com/android/server/telecom/Analytics.java index 7c384e60..44567343 100644 --- a/src/com/android/server/telecom/Analytics.java +++ b/src/com/android/server/telecom/Analytics.java @@ -16,6 +16,7 @@ package com.android.server.telecom; +import android.telecom.Connection; import android.telecom.DisconnectCause; import android.telecom.ParcelableCallAnalytics; import android.telecom.TelecomAnalytics; @@ -179,6 +180,9 @@ public class Analytics { public void addInCallService(String serviceName, int type) { } + + public void addCallProperties(int properties) { + } } /** @@ -211,6 +215,8 @@ public class Analytics { public boolean isVideo = false; public List<TelecomLogClass.VideoEvent> videoEvents; public List<TelecomLogClass.InCallServiceInfo> inCallServiceInfos; + public int callProperties = 0; + private long mTimeOfLastVideoEvent = -1; CallInfoImpl(String callId, int callDirection) { @@ -238,6 +244,7 @@ public class Analytics { this.callEvents = other.callEvents; this.isVideo = other.isVideo; this.videoEvents = other.videoEvents; + this.callProperties = other.callProperties; if (other.callTerminationReason != null) { this.callTerminationReason = new DisconnectCause( @@ -336,6 +343,11 @@ public class Analytics { } @Override + public void addCallProperties(int properties) { + this.callProperties |= properties; + } + + @Override public String toString() { return "{\n" + " startTime: " + startTime + '\n' @@ -348,6 +360,8 @@ public class Analytics { + " connectionService: " + connectionService + '\n' + " isVideoCall: " + isVideo + '\n' + " inCallServices: " + getInCallServicesString() + '\n' + + " callProperties: " + Connection.propertiesToStringShort(callProperties) + + '\n' + "}\n"; } @@ -415,7 +429,8 @@ public class Analytics { .setIsEmergencyCall(isEmergency) .setIsCreatedFromExistingConnection(createdFromExistingConnection) .setIsEmergencyCall(isEmergency) - .setIsVideoCall(isVideo); + .setIsVideoCall(isVideo) + .setConnectionProperties(callProperties); result.connectionService = new String[] {connectionService}; if (callEvents != null) { |