Merge "Fix for call timer resetting when starting IMS conference call. 1/4" into lmp-mr1-dev
This commit is contained in:
@@ -32,6 +32,12 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
|||||||
@SystemApi
|
@SystemApi
|
||||||
public abstract class Conference implements IConferenceable {
|
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 */
|
/** @hide */
|
||||||
public abstract static class Listener {
|
public abstract static class Listener {
|
||||||
public void onStateChanged(Conference conference, int oldState, int newState) {}
|
public void onStateChanged(Conference conference, int oldState, int newState) {}
|
||||||
@@ -59,6 +65,7 @@ public abstract class Conference implements IConferenceable {
|
|||||||
private DisconnectCause mDisconnectCause;
|
private DisconnectCause mDisconnectCause;
|
||||||
private int mConnectionCapabilities;
|
private int mConnectionCapabilities;
|
||||||
private String mDisconnectMessage;
|
private String mDisconnectMessage;
|
||||||
|
private long mConnectTimeMillis = CONNECT_TIME_NOT_SPECIFIED;
|
||||||
|
|
||||||
private final Connection.Listener mConnectionDeathListener = new Connection.Listener() {
|
private final Connection.Listener mConnectionDeathListener = new Connection.Listener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -421,6 +428,26 @@ public abstract class Conference implements IConferenceable {
|
|||||||
return mUnmodifiableChildConnections.get(0);
|
return mUnmodifiableChildConnections.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* Inform this Conference that the state of its audio output has been changed externally.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -883,7 +883,8 @@ public abstract class ConnectionService extends Service {
|
|||||||
conference.getPhoneAccountHandle(),
|
conference.getPhoneAccountHandle(),
|
||||||
conference.getState(),
|
conference.getState(),
|
||||||
conference.getConnectionCapabilities(),
|
conference.getConnectionCapabilities(),
|
||||||
connectionIds);
|
connectionIds,
|
||||||
|
conference.getConnectTimeMillis());
|
||||||
mAdapter.addConferenceCall(id, parcelableConference);
|
mAdapter.addConferenceCall(id, parcelableConference);
|
||||||
|
|
||||||
// Go through any child calls and set the parent.
|
// Go through any child calls and set the parent.
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public final class ParcelableConference implements Parcelable {
|
|||||||
private int mState;
|
private int mState;
|
||||||
private int mConnectionCapabilities;
|
private int mConnectionCapabilities;
|
||||||
private List<String> mConnectionIds;
|
private List<String> mConnectionIds;
|
||||||
|
private long mConnectTimeMillis;
|
||||||
|
|
||||||
public ParcelableConference(
|
public ParcelableConference(
|
||||||
PhoneAccountHandle phoneAccount,
|
PhoneAccountHandle phoneAccount,
|
||||||
@@ -42,6 +43,17 @@ public final class ParcelableConference implements Parcelable {
|
|||||||
mState = state;
|
mState = state;
|
||||||
mConnectionCapabilities = connectionCapabilities;
|
mConnectionCapabilities = connectionCapabilities;
|
||||||
mConnectionIds = connectionIds;
|
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
|
@Override
|
||||||
@@ -53,6 +65,8 @@ public final class ParcelableConference implements Parcelable {
|
|||||||
.append(Connection.stateToString(mState))
|
.append(Connection.stateToString(mState))
|
||||||
.append(", capabilities: ")
|
.append(", capabilities: ")
|
||||||
.append(Connection.capabilitiesToString(mConnectionCapabilities))
|
.append(Connection.capabilitiesToString(mConnectionCapabilities))
|
||||||
|
.append(", connectTime: ")
|
||||||
|
.append(mConnectTimeMillis)
|
||||||
.append(", children: ")
|
.append(", children: ")
|
||||||
.append(mConnectionIds)
|
.append(mConnectionIds)
|
||||||
.toString();
|
.toString();
|
||||||
@@ -74,6 +88,10 @@ public final class ParcelableConference implements Parcelable {
|
|||||||
return mConnectionIds;
|
return mConnectionIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getConnectTimeMillis() {
|
||||||
|
return mConnectTimeMillis;
|
||||||
|
}
|
||||||
|
|
||||||
public static final Parcelable.Creator<ParcelableConference> CREATOR =
|
public static final Parcelable.Creator<ParcelableConference> CREATOR =
|
||||||
new Parcelable.Creator<ParcelableConference> () {
|
new Parcelable.Creator<ParcelableConference> () {
|
||||||
@Override
|
@Override
|
||||||
@@ -84,8 +102,10 @@ public final class ParcelableConference implements Parcelable {
|
|||||||
int capabilities = source.readInt();
|
int capabilities = source.readInt();
|
||||||
List<String> connectionIds = new ArrayList<>(2);
|
List<String> connectionIds = new ArrayList<>(2);
|
||||||
source.readList(connectionIds, classLoader);
|
source.readList(connectionIds, classLoader);
|
||||||
|
long connectTimeMillis = source.readLong();
|
||||||
|
|
||||||
return new ParcelableConference(phoneAccount, state, capabilities, connectionIds);
|
return new ParcelableConference(phoneAccount, state, capabilities, connectionIds,
|
||||||
|
connectTimeMillis);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -107,5 +127,6 @@ public final class ParcelableConference implements Parcelable {
|
|||||||
destination.writeInt(mState);
|
destination.writeInt(mState);
|
||||||
destination.writeInt(mConnectionCapabilities);
|
destination.writeInt(mConnectionCapabilities);
|
||||||
destination.writeList(mConnectionIds);
|
destination.writeList(mConnectionIds);
|
||||||
|
destination.writeLong(mConnectTimeMillis);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user