Merge \"Add video events to ParcelableCallAnalytics\" into nyc-mr1-dev
am: 335a69d460
Change-Id: Icc0aef243860e93e714fcbc4b8cdc336d99e81f1
This commit is contained in:
@@ -39382,10 +39382,14 @@ package android.telecom {
|
|||||||
method public java.lang.String getConnectionService();
|
method public java.lang.String getConnectionService();
|
||||||
method public java.util.List<android.telecom.ParcelableCallAnalytics.EventTiming> getEventTimings();
|
method public java.util.List<android.telecom.ParcelableCallAnalytics.EventTiming> getEventTimings();
|
||||||
method public long getStartTimeMillis();
|
method public long getStartTimeMillis();
|
||||||
|
method public java.util.List<android.telecom.ParcelableCallAnalytics.VideoEvent> getVideoEvents();
|
||||||
method public boolean isAdditionalCall();
|
method public boolean isAdditionalCall();
|
||||||
method public boolean isCreatedFromExistingConnection();
|
method public boolean isCreatedFromExistingConnection();
|
||||||
method public boolean isEmergencyCall();
|
method public boolean isEmergencyCall();
|
||||||
method public boolean isInterrupted();
|
method public boolean isInterrupted();
|
||||||
|
method public boolean isVideoCall();
|
||||||
|
method public void setIsVideoCall(boolean);
|
||||||
|
method public void setVideoEvents(java.util.List<android.telecom.ParcelableCallAnalytics.VideoEvent>);
|
||||||
method public void writeToParcel(android.os.Parcel, int);
|
method public void writeToParcel(android.os.Parcel, int);
|
||||||
field public static final int CALLTYPE_INCOMING = 1; // 0x1
|
field public static final int CALLTYPE_INCOMING = 1; // 0x1
|
||||||
field public static final int CALLTYPE_OUTGOING = 2; // 0x2
|
field public static final int CALLTYPE_OUTGOING = 2; // 0x2
|
||||||
@@ -39468,6 +39472,20 @@ package android.telecom {
|
|||||||
field public static final int UNHOLD_TIMING = 4; // 0x4
|
field public static final int UNHOLD_TIMING = 4; // 0x4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final class ParcelableCallAnalytics.VideoEvent implements android.os.Parcelable {
|
||||||
|
ctor public ParcelableCallAnalytics.VideoEvent(int, long, int);
|
||||||
|
method public int describeContents();
|
||||||
|
method public int getEventName();
|
||||||
|
method public long getTimeSinceLastEvent();
|
||||||
|
method public int getVideoState();
|
||||||
|
method public void writeToParcel(android.os.Parcel, int);
|
||||||
|
field public static final android.os.Parcelable.Creator<android.telecom.ParcelableCallAnalytics.VideoEvent> CREATOR;
|
||||||
|
field public static final int RECEIVE_REMOTE_SESSION_MODIFY_REQUEST = 2; // 0x2
|
||||||
|
field public static final int RECEIVE_REMOTE_SESSION_MODIFY_RESPONSE = 3; // 0x3
|
||||||
|
field public static final int SEND_LOCAL_SESSION_MODIFY_REQUEST = 0; // 0x0
|
||||||
|
field public static final int SEND_LOCAL_SESSION_MODIFY_RESPONSE = 1; // 0x1
|
||||||
|
}
|
||||||
|
|
||||||
public final deprecated class Phone {
|
public final deprecated class Phone {
|
||||||
method public final void addListener(android.telecom.Phone.Listener);
|
method public final void addListener(android.telecom.Phone.Listener);
|
||||||
method public final boolean canAddCall();
|
method public final boolean canAddCall();
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import android.os.Parcel;
|
|||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -28,6 +29,67 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@SystemApi
|
@SystemApi
|
||||||
public class ParcelableCallAnalytics implements Parcelable {
|
public class ParcelableCallAnalytics implements Parcelable {
|
||||||
|
public static final class VideoEvent implements Parcelable {
|
||||||
|
public static final int SEND_LOCAL_SESSION_MODIFY_REQUEST = 0;
|
||||||
|
public static final int SEND_LOCAL_SESSION_MODIFY_RESPONSE = 1;
|
||||||
|
public static final int RECEIVE_REMOTE_SESSION_MODIFY_REQUEST = 2;
|
||||||
|
public static final int RECEIVE_REMOTE_SESSION_MODIFY_RESPONSE = 3;
|
||||||
|
|
||||||
|
public static final Parcelable.Creator<VideoEvent> CREATOR =
|
||||||
|
new Parcelable.Creator<VideoEvent> () {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VideoEvent createFromParcel(Parcel in) {
|
||||||
|
return new VideoEvent(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VideoEvent[] newArray(int size) {
|
||||||
|
return new VideoEvent[size];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private int mEventName;
|
||||||
|
private long mTimeSinceLastEvent;
|
||||||
|
private int mVideoState;
|
||||||
|
|
||||||
|
public VideoEvent(int eventName, long timeSinceLastEvent, int videoState) {
|
||||||
|
mEventName = eventName;
|
||||||
|
mTimeSinceLastEvent = timeSinceLastEvent;
|
||||||
|
mVideoState = videoState;
|
||||||
|
}
|
||||||
|
|
||||||
|
VideoEvent(Parcel in) {
|
||||||
|
mEventName = in.readInt();
|
||||||
|
mTimeSinceLastEvent = in.readLong();
|
||||||
|
mVideoState = in.readInt();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getEventName() {
|
||||||
|
return mEventName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTimeSinceLastEvent() {
|
||||||
|
return mTimeSinceLastEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getVideoState() {
|
||||||
|
return mVideoState;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int describeContents() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
|
out.writeInt(mEventName);
|
||||||
|
out.writeLong(mTimeSinceLastEvent);
|
||||||
|
out.writeInt(mVideoState);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static final class AnalyticsEvent implements Parcelable {
|
public static final class AnalyticsEvent implements Parcelable {
|
||||||
public static final int SET_SELECT_PHONE_ACCOUNT = 0;
|
public static final int SET_SELECT_PHONE_ACCOUNT = 0;
|
||||||
public static final int SET_ACTIVE = 1;
|
public static final int SET_ACTIVE = 1;
|
||||||
@@ -250,6 +312,12 @@ public class ParcelableCallAnalytics implements Parcelable {
|
|||||||
// A map from event-pair names to their durations.
|
// A map from event-pair names to their durations.
|
||||||
private final List<EventTiming> eventTimings;
|
private final List<EventTiming> eventTimings;
|
||||||
|
|
||||||
|
// Whether the call has ever been a video call.
|
||||||
|
private boolean isVideoCall = false;
|
||||||
|
|
||||||
|
// A list of video events that have occurred.
|
||||||
|
private List<VideoEvent> videoEvents;
|
||||||
|
|
||||||
public ParcelableCallAnalytics(long startTimeMillis, long callDurationMillis, int callType,
|
public ParcelableCallAnalytics(long startTimeMillis, long callDurationMillis, int callType,
|
||||||
boolean isAdditionalCall, boolean isInterrupted, int callTechnologies,
|
boolean isAdditionalCall, boolean isInterrupted, int callTechnologies,
|
||||||
int callTerminationCode, boolean isEmergencyCall, String connectionService,
|
int callTerminationCode, boolean isEmergencyCall, String connectionService,
|
||||||
@@ -284,6 +352,9 @@ public class ParcelableCallAnalytics implements Parcelable {
|
|||||||
in.readTypedList(analyticsEvents, AnalyticsEvent.CREATOR);
|
in.readTypedList(analyticsEvents, AnalyticsEvent.CREATOR);
|
||||||
eventTimings = new ArrayList<>();
|
eventTimings = new ArrayList<>();
|
||||||
in.readTypedList(eventTimings, EventTiming.CREATOR);
|
in.readTypedList(eventTimings, EventTiming.CREATOR);
|
||||||
|
isVideoCall = readByteAsBoolean(in);
|
||||||
|
videoEvents = new LinkedList<>();
|
||||||
|
in.readTypedList(videoEvents, VideoEvent.CREATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToParcel(Parcel out, int flags) {
|
public void writeToParcel(Parcel out, int flags) {
|
||||||
@@ -299,6 +370,15 @@ public class ParcelableCallAnalytics implements Parcelable {
|
|||||||
writeBooleanAsByte(out, isCreatedFromExistingConnection);
|
writeBooleanAsByte(out, isCreatedFromExistingConnection);
|
||||||
out.writeTypedList(analyticsEvents);
|
out.writeTypedList(analyticsEvents);
|
||||||
out.writeTypedList(eventTimings);
|
out.writeTypedList(eventTimings);
|
||||||
|
writeBooleanAsByte(out, isVideoCall);
|
||||||
|
out.writeTypedList(videoEvents);
|
||||||
|
}
|
||||||
|
public void setIsVideoCall(boolean isVideoCall) {
|
||||||
|
this.isVideoCall = isVideoCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideoEvents(List<VideoEvent> videoEvents) {
|
||||||
|
this.videoEvents = videoEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getStartTimeMillis() {
|
public long getStartTimeMillis() {
|
||||||
@@ -349,6 +429,14 @@ public class ParcelableCallAnalytics implements Parcelable {
|
|||||||
return eventTimings;
|
return eventTimings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isVideoCall() {
|
||||||
|
return isVideoCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<VideoEvent> getVideoEvents() {
|
||||||
|
return videoEvents;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int describeContents() {
|
public int describeContents() {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user