Merge "Ensure conference state is posted to Telecom for new conferences."
This commit is contained in:
@@ -106,6 +106,7 @@ public abstract class Conference extends Conferenceable {
|
|||||||
private int mCallerDisplayNamePresentation;
|
private int mCallerDisplayNamePresentation;
|
||||||
private int mCallDirection;
|
private int mCallDirection;
|
||||||
private boolean mRingbackRequested = false;
|
private boolean mRingbackRequested = false;
|
||||||
|
private boolean mIsMultiparty = true;
|
||||||
|
|
||||||
private final Connection.Listener mConnectionDeathListener = new Connection.Listener() {
|
private final Connection.Listener mConnectionDeathListener = new Connection.Listener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -998,8 +999,8 @@ public abstract class Conference extends Conferenceable {
|
|||||||
public void onExtrasChanged(Bundle extras) {}
|
public void onExtrasChanged(Bundle extras) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set whether Telecom should treat this {@link Conference} as a conference call or if it
|
* Set whether Telecom should treat this {@link Conference} as a multiparty conference call or
|
||||||
* should treat it as a single-party call.
|
* if it should treat it as a single-party call.
|
||||||
* This method is used as part of a workaround regarding IMS conference calls and user
|
* This method is used as part of a workaround regarding IMS conference calls and user
|
||||||
* expectation. In IMS, once a conference is formed, the UE is connected to an IMS conference
|
* expectation. In IMS, once a conference is formed, the UE is connected to an IMS conference
|
||||||
* server. If all participants of the conference drop out of the conference except for one, the
|
* server. If all participants of the conference drop out of the conference except for one, the
|
||||||
@@ -1020,6 +1021,7 @@ public abstract class Conference extends Conferenceable {
|
|||||||
@TestApi
|
@TestApi
|
||||||
@RequiresPermission(MODIFY_PHONE_STATE)
|
@RequiresPermission(MODIFY_PHONE_STATE)
|
||||||
public void setConferenceState(boolean isConference) {
|
public void setConferenceState(boolean isConference) {
|
||||||
|
mIsMultiparty = isConference;
|
||||||
for (Listener l : mListeners) {
|
for (Listener l : mListeners) {
|
||||||
l.onConferenceStateChanged(this, isConference);
|
l.onConferenceStateChanged(this, isConference);
|
||||||
}
|
}
|
||||||
@@ -1043,6 +1045,20 @@ public abstract class Conference extends Conferenceable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if the {@link Conference} is considered "multiparty" or not. By default all
|
||||||
|
* conferences are considered multiparty. A multiparty conference is one where there are
|
||||||
|
* multiple conference participants (other than the host) in the conference.
|
||||||
|
* This is tied to {@link #setConferenceState(boolean)}, which is used for some use cases to
|
||||||
|
* have a conference appear as if it is a standalone call, in which case the conference will
|
||||||
|
* no longer be multiparty.
|
||||||
|
* @return {@code true} if conference is treated as a conference (i.e. it is multiparty),
|
||||||
|
* {@code false} if it should emulate a standalone call (i.e. not multiparty).
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
public boolean isMultiparty() {
|
||||||
|
return mIsMultiparty;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the address of this {@link Conference}. Used when {@link #setConferenceState(boolean)}
|
* Sets the address of this {@link Conference}. Used when {@link #setConferenceState(boolean)}
|
||||||
|
|||||||
@@ -2505,6 +2505,11 @@ public abstract class ConnectionService extends Service {
|
|||||||
mAdapter.addConferenceCall(id, parcelableConference);
|
mAdapter.addConferenceCall(id, parcelableConference);
|
||||||
mAdapter.setVideoProvider(id, conference.getVideoProvider());
|
mAdapter.setVideoProvider(id, conference.getVideoProvider());
|
||||||
mAdapter.setVideoState(id, conference.getVideoState());
|
mAdapter.setVideoState(id, conference.getVideoState());
|
||||||
|
// In some instances a conference can start its life as a standalone call with just a
|
||||||
|
// single participant; ensure we signal to Telecom in this case.
|
||||||
|
if (!conference.isMultiparty()) {
|
||||||
|
mAdapter.setConferenceState(id, conference.isMultiparty());
|
||||||
|
}
|
||||||
|
|
||||||
// Go through any child calls and set the parent.
|
// Go through any child calls and set the parent.
|
||||||
for (Connection connection : conference.getConnections()) {
|
for (Connection connection : conference.getConnections()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user