Methods Summary |
---|
public void | addCapability(int capability)Adds the specified capability to the set of capabilities of this {@code Conference}.
mConnectionCapabilities |= capability;
|
public final boolean | addConnection(Connection connection)Adds the specified connection as a child of this conference.
if (connection != null && !mChildConnections.contains(connection)) {
if (connection.setConference(this)) {
mChildConnections.add(connection);
onConnectionAdded(connection);
for (Listener l : mListeners) {
l.onConnectionAdded(this, connection);
}
return true;
}
}
return false;
|
public final android.telecom.Conference | addListener(android.telecom.Conference$Listener listener)Add a listener to be notified of a state change.
mListeners.add(listener);
return this;
|
public static boolean | can(int capabilities, int capability)Whether the given capabilities support the specified capability.
return (capabilities & capability) != 0;
|
public boolean | can(int capability)Whether the capabilities of this {@code Connection} supports the specified capability.
return can(mConnectionCapabilities, capability);
|
private final void | clearConferenceableList()
for (Connection c : mConferenceableConnections) {
c.removeConnectionListener(mConnectionDeathListener);
}
mConferenceableConnections.clear();
|
public final void | destroy()Tears down the conference object and any of its current connections.
Log.d(this, "destroying conference : %s", this);
// Tear down the children.
for (Connection connection : mChildConnections) {
Log.d(this, "removing connection %s", connection);
removeConnection(connection);
}
// If not yet disconnected, set the conference call as disconnected first.
if (mState != Connection.STATE_DISCONNECTED) {
Log.d(this, "setting to disconnected");
setDisconnected(new DisconnectCause(DisconnectCause.LOCAL));
}
// ...and notify.
for (Listener l : mListeners) {
l.onDestroyed(this);
}
|
private final void | fireOnConferenceableConnectionsChanged()
for (Listener l : mListeners) {
l.onConferenceableConnectionsChanged(this, getConferenceableConnections());
}
|
public final AudioState | getAudioState()
return mAudioState;
|
public final int | getCapabilities()
return getConnectionCapabilities();
|
public final java.util.List | getConferenceableConnections()Returns the connections with which this connection can be conferenced.
return mUnmodifiableConferenceableConnections;
|
public long | getConnectTimeMillis()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 mConnectTimeMillis;
|
public final int | getConnectionCapabilities()Returns the capabilities of a conference. See {@code CAPABILITY_*} constants in class
{@link Connection} for valid values.
return mConnectionCapabilities;
|
public final java.util.List | getConnections()Returns the list of connections currently associated with the conference call.
return mUnmodifiableChildConnections;
|
public final DisconnectCause | getDisconnectCause()
return mDisconnectCause;
|
public final PhoneAccountHandle | getPhoneAccountHandle()Returns the {@link PhoneAccountHandle} the conference call is being placed through.
return mPhoneAccount;
|
public Connection | getPrimaryConnection()Retrieves the primary connection associated with the conference. The primary connection is
the connection from which the conference will retrieve its current state.
if (mUnmodifiableChildConnections == null || mUnmodifiableChildConnections.isEmpty()) {
return null;
}
return mUnmodifiableChildConnections.get(0);
|
public final int | getState()Gets the state of the conference call. See {@link Connection} for valid values.
return mState;
|
public void | onAudioStateChanged(AudioState state)Notifies this conference that the {@link #getAudioState()} property has a new value.
|
public void | onConnectionAdded(Connection connection)Notifies this conference that a connection has been added to it.
|
public void | onDisconnect()Invoked when the Conference and all it's {@link Connection}s should be disconnected.
|
public void | onHold()Invoked when the conference should be put on hold.
|
public void | onMerge(Connection connection)Invoked when the specified {@link Connection} should merged with the conference call.
|
public void | onMerge()Invoked when the child calls should be merged. Only invoked if the conference contains the
capability {@link Connection#CAPABILITY_MERGE_CONFERENCE}.
|
public void | onPlayDtmfTone(char c)Notifies this conference of a request to play a DTMF tone.
|
public void | onSeparate(Connection connection)Invoked when the specified {@link Connection} should be separated from the conference call.
|
public void | onStopDtmfTone()Notifies this conference of a request to stop any currently playing DTMF tones.
|
public void | onSwap()Invoked when the child calls should be swapped. Only invoked if the conference contains the
capability {@link Connection#CAPABILITY_SWAP_CONFERENCE}.
|
public void | onUnhold()Invoked when the conference should be moved from hold to active.
|
public void | removeCapability(int capability)Removes the specified capability from the set of capabilities of this {@code Conference}.
mConnectionCapabilities &= ~capability;
|
public final void | removeConnection(Connection connection)Removes the specified connection as a child of this conference.
Log.d(this, "removing %s from %s", connection, mChildConnections);
if (connection != null && mChildConnections.remove(connection)) {
connection.resetConference();
for (Listener l : mListeners) {
l.onConnectionRemoved(this, connection);
}
}
|
public final android.telecom.Conference | removeListener(android.telecom.Conference$Listener listener)Removes the specified listener.
mListeners.remove(listener);
return this;
|
public final void | setActive()Sets state to be active.
setState(Connection.STATE_ACTIVE);
|
final void | setAudioState(AudioState state)Inform this Conference that the state of its audio output has been changed externally.
Log.d(this, "setAudioState %s", state);
mAudioState = state;
onAudioStateChanged(state);
|
public final void | setCapabilities(int connectionCapabilities)
setConnectionCapabilities(connectionCapabilities);
|
public final void | setConferenceableConnections(java.util.List conferenceableConnections)Sets the connections with which this connection can be conferenced.
clearConferenceableList();
for (Connection c : conferenceableConnections) {
// If statement checks for duplicates in input. It makes it N^2 but we're dealing with a
// small amount of items here.
if (!mConferenceableConnections.contains(c)) {
c.addConnectionListener(mConnectionDeathListener);
mConferenceableConnections.add(c);
}
}
fireOnConferenceableConnectionsChanged();
|
public void | setConnectTimeMillis(long connectTimeMillis)Sets the connect time of the {@code Conference}.
mConnectTimeMillis = connectTimeMillis;
|
public final void | setConnectionCapabilities(int connectionCapabilities)Sets the capabilities of a conference. See {@code CAPABILITY_*} constants of class
{@link Connection} for valid values.
if (connectionCapabilities != mConnectionCapabilities) {
mConnectionCapabilities = connectionCapabilities;
for (Listener l : mListeners) {
l.onConnectionCapabilitiesChanged(this, mConnectionCapabilities);
}
}
|
public final void | setDisconnected(DisconnectCause disconnectCause)Sets state to disconnected.
mDisconnectCause = disconnectCause;;
setState(Connection.STATE_DISCONNECTED);
for (Listener l : mListeners) {
l.onDisconnected(this, mDisconnectCause);
}
|
public final void | setOnHold()Sets state to be on hold.
setState(Connection.STATE_HOLDING);
|
private void | setState(int newState)
if (newState != Connection.STATE_ACTIVE &&
newState != Connection.STATE_HOLDING &&
newState != Connection.STATE_DISCONNECTED) {
Log.w(this, "Unsupported state transition for Conference call.",
Connection.stateToString(newState));
return;
}
if (mState != newState) {
int oldState = mState;
mState = newState;
for (Listener l : mListeners) {
l.onStateChanged(this, oldState, newState);
}
}
|