summaryrefslogtreecommitdiffstats
path: root/telecomm
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-01-12 09:02:01 -0800
committerTyler Gunn <tgunn@google.com>2015-01-12 09:02:01 -0800
commitcd5d33c89f25b3bfe8989d55f05702d0970c13b4 (patch)
treede152360f527e8080c703c30c9a29c9b827e323b /telecomm
parent1eee52b1aa0ba0cc05ac513d0fa91de9ee643faf (diff)
downloadframeworks_base-cd5d33c89f25b3bfe8989d55f05702d0970c13b4.zip
frameworks_base-cd5d33c89f25b3bfe8989d55f05702d0970c13b4.tar.gz
frameworks_base-cd5d33c89f25b3bfe8989d55f05702d0970c13b4.tar.bz2
Fix for call timer resetting when starting IMS conference call. 1/4
- Added support in Conference for specifying the connect time when the conference is created. Bug: 18959443 Change-Id: I501edde3b62f6bf021eb7455089e80626013da12
Diffstat (limited to 'telecomm')
-rw-r--r--telecomm/java/android/telecom/Conference.java27
-rw-r--r--telecomm/java/android/telecom/ConnectionService.java3
-rw-r--r--telecomm/java/android/telecom/ParcelableConference.java23
3 files changed, 51 insertions, 2 deletions
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java
index e764cd5..33bbb29 100644
--- a/telecomm/java/android/telecom/Conference.java
+++ b/telecomm/java/android/telecom/Conference.java
@@ -32,6 +32,12 @@ import java.util.concurrent.CopyOnWriteArraySet;
@SystemApi
public abstract class Conference implements IConferenceable {
+ /**
+ * Used to indicate that the conference connection time is not specified. If not specified,
+ * Telecom will set the connect time.
+ */
+ public static long CONNECT_TIME_NOT_SPECIFIED = 0;
+
/** @hide */
public abstract static class Listener {
public void onStateChanged(Conference conference, int oldState, int newState) {}
@@ -59,6 +65,7 @@ public abstract class Conference implements IConferenceable {
private DisconnectCause mDisconnectCause;
private int mConnectionCapabilities;
private String mDisconnectMessage;
+ private long mConnectTimeMillis = CONNECT_TIME_NOT_SPECIFIED;
private final Connection.Listener mConnectionDeathListener = new Connection.Listener() {
@Override
@@ -422,6 +429,26 @@ public abstract class Conference implements IConferenceable {
}
/**
+ * Sets the connect time of the {@code Conference}.
+ *
+ * @param connectTimeMillis The connection time, in milliseconds.
+ */
+ public void setConnectTimeMillis(long connectTimeMillis) {
+ mConnectTimeMillis = connectTimeMillis;
+ }
+
+ /**
+ * Retrieves the connect time of the {@code Conference}, if specified. A value of
+ * {@link #CONNECT_TIME_NOT_SPECIFIED} indicates that Telecom should determine the start time
+ * of the conference.
+ *
+ * @return The time the {@code Conference} has been connected.
+ */
+ public long getConnectTimeMillis() {
+ return mConnectTimeMillis;
+ }
+
+ /**
* Inform this Conference that the state of its audio output has been changed externally.
*
* @param state The new audio state.
diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java
index df16375..dfdc3e1 100644
--- a/telecomm/java/android/telecom/ConnectionService.java
+++ b/telecomm/java/android/telecom/ConnectionService.java
@@ -883,7 +883,8 @@ public abstract class ConnectionService extends Service {
conference.getPhoneAccountHandle(),
conference.getState(),
conference.getConnectionCapabilities(),
- connectionIds);
+ connectionIds,
+ conference.getConnectTimeMillis());
mAdapter.addConferenceCall(id, parcelableConference);
// Go through any child calls and set the parent.
diff --git a/telecomm/java/android/telecom/ParcelableConference.java b/telecomm/java/android/telecom/ParcelableConference.java
index c4e11d6..dcc2713 100644
--- a/telecomm/java/android/telecom/ParcelableConference.java
+++ b/telecomm/java/android/telecom/ParcelableConference.java
@@ -32,6 +32,7 @@ public final class ParcelableConference implements Parcelable {
private int mState;
private int mConnectionCapabilities;
private List<String> mConnectionIds;
+ private long mConnectTimeMillis;
public ParcelableConference(
PhoneAccountHandle phoneAccount,
@@ -42,6 +43,17 @@ public final class ParcelableConference implements Parcelable {
mState = state;
mConnectionCapabilities = connectionCapabilities;
mConnectionIds = connectionIds;
+ mConnectTimeMillis = Conference.CONNECT_TIME_NOT_SPECIFIED;
+ }
+
+ public ParcelableConference(
+ PhoneAccountHandle phoneAccount,
+ int state,
+ int connectionCapabilities,
+ List<String> connectionIds,
+ long connectTimeMillis) {
+ this(phoneAccount, state, connectionCapabilities, connectionIds);
+ mConnectTimeMillis = connectTimeMillis;
}
@Override
@@ -53,6 +65,8 @@ public final class ParcelableConference implements Parcelable {
.append(Connection.stateToString(mState))
.append(", capabilities: ")
.append(Connection.capabilitiesToString(mConnectionCapabilities))
+ .append(", connectTime: ")
+ .append(mConnectTimeMillis)
.append(", children: ")
.append(mConnectionIds)
.toString();
@@ -74,6 +88,10 @@ public final class ParcelableConference implements Parcelable {
return mConnectionIds;
}
+ public long getConnectTimeMillis() {
+ return mConnectTimeMillis;
+ }
+
public static final Parcelable.Creator<ParcelableConference> CREATOR =
new Parcelable.Creator<ParcelableConference> () {
@Override
@@ -84,8 +102,10 @@ public final class ParcelableConference implements Parcelable {
int capabilities = source.readInt();
List<String> connectionIds = new ArrayList<>(2);
source.readList(connectionIds, classLoader);
+ long connectTimeMillis = source.readLong();
- return new ParcelableConference(phoneAccount, state, capabilities, connectionIds);
+ return new ParcelableConference(phoneAccount, state, capabilities, connectionIds,
+ connectTimeMillis);
}
@Override
@@ -107,5 +127,6 @@ public final class ParcelableConference implements Parcelable {
destination.writeInt(mState);
destination.writeInt(mConnectionCapabilities);
destination.writeList(mConnectionIds);
+ destination.writeLong(mConnectTimeMillis);
}
}