summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--telecomm/java/android/telecom/Connection.java26
-rw-r--r--telecomm/java/android/telecom/ConnectionService.java2
-rw-r--r--telecomm/java/android/telecom/ParcelableConnection.java10
3 files changed, 38 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java
index 377c44b..2ab6d56 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -1057,6 +1057,7 @@ public abstract class Connection extends Conferenceable {
private int mConnectionCapabilities;
private VideoProvider mVideoProvider;
private boolean mAudioModeIsVoip;
+ private long mConnectTimeMillis = Conference.CONNECT_TIME_NOT_SPECIFIED;
private StatusHints mStatusHints;
private int mVideoState;
private DisconnectCause mDisconnectCause;
@@ -1169,6 +1170,19 @@ public abstract class Connection extends Conferenceable {
}
/**
+ * Retrieves the connection start time of the {@code Connnection}, if specified. A value of
+ * {@link Conference#CONNECT_TIME_NOT_SPECIFIED} indicates that Telecom should determine the
+ * start time of the conference.
+ *
+ * @return The time at which the {@code Connnection} was connected.
+ *
+ * @hide
+ */
+ public final long getConnectTimeMillis() {
+ return mConnectTimeMillis;
+ }
+
+ /**
* @return The status hints for this connection.
*/
public final StatusHints getStatusHints() {
@@ -1483,6 +1497,18 @@ public abstract class Connection extends Conferenceable {
}
/**
+ * Sets the time at which a call became active on this Connection. This is set only
+ * when a conference call becomes active on this connection.
+ *
+ * @param connectionTimeMillis The connection time, in milliseconds.
+ *
+ * @hide
+ */
+ public final void setConnectTimeMillis(long connectTimeMillis) {
+ mConnectTimeMillis = connectTimeMillis;
+ }
+
+ /**
* Sets the label and icon status to display in the in-call UI.
*
* @param statusHints The status label and icon to set.
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index 966b2ae..383e45b 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -651,6 +651,7 @@ public abstract class ConnectionService extends Service {
connection.getVideoState(),
connection.isRingbackRequested(),
connection.getAudioModeIsVoip(),
+ connection.getConnectTimeMillis(),
connection.getStatusHints(),
connection.getDisconnectCause(),
createIdList(connection.getConferenceables()),
@@ -982,6 +983,7 @@ public abstract class ConnectionService extends Service {
connection.getVideoState(),
connection.isRingbackRequested(),
connection.getAudioModeIsVoip(),
+ connection.getConnectTimeMillis(),
connection.getStatusHints(),
connection.getDisconnectCause(),
emptyList,
diff --git a/telecomm/java/android/telecom/ParcelableConnection.java b/telecomm/java/android/telecom/ParcelableConnection.java
index 683ab6a..fe0a4d8 100644
--- a/telecomm/java/android/telecom/ParcelableConnection.java
+++ b/telecomm/java/android/telecom/ParcelableConnection.java
@@ -44,6 +44,7 @@ public final class ParcelableConnection implements Parcelable {
private final int mVideoState;
private final boolean mRingbackRequested;
private final boolean mIsVoipAudioMode;
+ private final long mConnectTimeMillis;
private final StatusHints mStatusHints;
private final DisconnectCause mDisconnectCause;
private final List<String> mConferenceableConnectionIds;
@@ -62,6 +63,7 @@ public final class ParcelableConnection implements Parcelable {
int videoState,
boolean ringbackRequested,
boolean isVoipAudioMode,
+ long connectTimeMillis,
StatusHints statusHints,
DisconnectCause disconnectCause,
List<String> conferenceableConnectionIds,
@@ -77,6 +79,7 @@ public final class ParcelableConnection implements Parcelable {
mVideoState = videoState;
mRingbackRequested = ringbackRequested;
mIsVoipAudioMode = isVoipAudioMode;
+ mConnectTimeMillis = connectTimeMillis;
mStatusHints = statusHints;
mDisconnectCause = disconnectCause;
mConferenceableConnectionIds = conferenceableConnectionIds;
@@ -128,6 +131,10 @@ public final class ParcelableConnection implements Parcelable {
return mIsVoipAudioMode;
}
+ public long getConnectTimeMillis() {
+ return mConnectTimeMillis;
+ }
+
public final StatusHints getStatusHints() {
return mStatusHints;
}
@@ -176,6 +183,7 @@ public final class ParcelableConnection implements Parcelable {
int videoState = source.readInt();
boolean ringbackRequested = source.readByte() == 1;
boolean audioModeIsVoip = source.readByte() == 1;
+ long connectTimeMillis = source.readLong();
StatusHints statusHints = source.readParcelable(classLoader);
DisconnectCause disconnectCause = source.readParcelable(classLoader);
List<String> conferenceableConnectionIds = new ArrayList<>();
@@ -194,6 +202,7 @@ public final class ParcelableConnection implements Parcelable {
videoState,
ringbackRequested,
audioModeIsVoip,
+ connectTimeMillis,
statusHints,
disconnectCause,
conferenceableConnectionIds,
@@ -227,6 +236,7 @@ public final class ParcelableConnection implements Parcelable {
destination.writeInt(mVideoState);
destination.writeByte((byte) (mRingbackRequested ? 1 : 0));
destination.writeByte((byte) (mIsVoipAudioMode ? 1 : 0));
+ destination.writeLong(mConnectTimeMillis);
destination.writeParcelable(mStatusHints, 0);
destination.writeParcelable(mDisconnectCause, 0);
destination.writeStringList(mConferenceableConnectionIds);