summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2015-07-16 23:09:14 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-16 23:09:19 +0000
commit5aff3b5489262ccff4b6f9e18e0d990ebfe4d7bc (patch)
tree1749e352ca3286b56ff528f77bb22b43171779e4 /telecomm
parentf7592b234acde62f0f0a93dad77284f12ca9980a (diff)
parente927ec02f5bbad925d5f28cbe370a04aa118f370 (diff)
downloadframeworks_base-5aff3b5489262ccff4b6f9e18e0d990ebfe4d7bc.zip
frameworks_base-5aff3b5489262ccff4b6f9e18e0d990ebfe4d7bc.tar.gz
frameworks_base-5aff3b5489262ccff4b6f9e18e0d990ebfe4d7bc.tar.bz2
Merge "Maintain call time across SRVCC (2/3)." into mnc-dev
Diffstat (limited to 'telecomm')
-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 58fb088..bf78712 100644
--- a/telecomm/java/android/telecom/Connection.java
+++ b/telecomm/java/android/telecom/Connection.java
@@ -1050,6 +1050,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;
@@ -1162,6 +1163,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() {
@@ -1476,6 +1490,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 d2e7a74..96f44b9 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()),
@@ -979,6 +980,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);