public static final int BLOCK_CHECK_FINISHED_TIMING = 9;
public static final int FILTERING_COMPLETED_TIMING = 10;
public static final int FILTERING_TIMED_OUT_TIMING = 11;
+ /** {@hide} */
+ public static final int START_CONNECTION_TO_REQUEST_DISCONNECT_TIMING = 12;
public static final int INVALID = 999999;
public static final int SIP_PHONE = 0x8;
public static final int THIRD_PARTY_PHONE = 0x10;
+ /**
+ * Indicating the call source is not specified.
+ *
+ * @hide
+ */
+ public static final int CALL_SOURCE_UNSPECIFIED = 0;
+
+ /**
+ * Indicating the call is initiated via emergency dialer's dialpad.
+ *
+ * @hide
+ */
+ public static final int CALL_SOURCE_EMERGENCY_DIALPAD = 1;
+
+ /**
+ * Indicating the call is initiated via emergency dialer's shortcut button.
+ *
+ * @hide
+ */
+ public static final int CALL_SOURCE_EMERGENCY_SHORTCUT = 2;
+
public static final long MILLIS_IN_5_MINUTES = 1000 * 60 * 5;
public static final long MILLIS_IN_1_SECOND = 1000;
// A list of video events that have occurred.
private List<VideoEvent> videoEvents;
+ // The source where user initiated this call. ONE OF the CALL_SOURCE_* constants.
+ private int callSource = CALL_SOURCE_UNSPECIFIED;
+
public ParcelableCallAnalytics(long startTimeMillis, long callDurationMillis, int callType,
boolean isAdditionalCall, boolean isInterrupted, int callTechnologies,
int callTerminationCode, boolean isEmergencyCall, String connectionService,
isVideoCall = readByteAsBoolean(in);
videoEvents = new LinkedList<>();
in.readTypedList(videoEvents, VideoEvent.CREATOR);
+ callSource = in.readInt();
}
public void writeToParcel(Parcel out, int flags) {
out.writeTypedList(eventTimings);
writeBooleanAsByte(out, isVideoCall);
out.writeTypedList(videoEvents);
+ out.writeInt(callSource);
}
/** {@hide} */
this.videoEvents = videoEvents;
}
+ /** {@hide} */
+ public void setCallSource(int callSource) {
+ this.callSource = callSource;
+ }
+
public long getStartTimeMillis() {
return startTimeMillis;
}
return videoEvents;
}
+ /** {@hide} */
+ public int getCallSource() {
+ return callSource;
+ }
+
@Override
public int describeContents() {
return 0;
"android.telecom.extra.USE_ASSISTED_DIALING";
/**
+ * Optional extra for {@link #placeCall(Uri, Bundle)} containing an integer that specifies
+ * the source where user initiated this call. This data is used in metrics.
+ * Valid source are:
+ * {@link ParcelableCallAnalytics#CALL_SOURCE_UNSPECIFIED},
+ * {@link ParcelableCallAnalytics#CALL_SOURCE_EMERGENCY_DIALPAD},
+ * {@link ParcelableCallAnalytics#CALL_SOURCE_EMERGENCY_SHORTCUT}.
+ *
+ * @hide
+ */
+ public static final String EXTRA_CALL_SOURCE = "android.telecom.extra.CALL_SOURCE";
+
+ /**
* The following 4 constants define how properties such as phone numbers and names are
* displayed to the user.
*/