public abstract class Conference extends Conferenceable
Connection
objects.Modifier and Type | Class and Description |
---|---|
static class |
Conference.Listener |
Modifier and Type | Field and Description |
---|---|
static long |
CONNECT_TIME_NOT_SPECIFIED
Used to indicate that the conference connection time is not specified.
|
Constructor and Description |
---|
Conference(PhoneAccountHandle phoneAccount)
Constructs a new Conference with a mandatory
PhoneAccountHandle |
Modifier and Type | Method and Description |
---|---|
void |
addCapability(int capability)
Adds the specified capability to the set of capabilities of this
Conference . |
boolean |
addConnection(Connection connection)
Adds the specified connection as a child of this conference.
|
Conference |
addListener(Conference.Listener listener)
Add a listener to be notified of a state change.
|
boolean |
can(int capability)
Whether the capabilities of this
Connection supports the specified capability. |
static boolean |
can(int capabilities,
int capability)
Whether the given capabilities support the specified capability.
|
void |
destroy()
Tears down the conference object and any of its current connections.
|
AudioState |
getAudioState()
Deprecated.
Use
getCallAudioState() instead. |
CallAudioState |
getCallAudioState() |
List<Connection> |
getConferenceableConnections()
Returns the connections with which this connection can be conferenced.
|
int |
getConnectionCapabilities()
Returns the capabilities of the conference.
|
int |
getConnectionProperties()
Returns the properties of the conference.
|
List<Connection> |
getConnections()
Returns the list of connections currently associated with the conference call.
|
long |
getConnectionTime()
Retrieves the connection start time of the
Conference , if specified. |
long |
getConnectTimeMillis()
Deprecated.
Use
getConnectionTime() . |
DisconnectCause |
getDisconnectCause() |
Bundle |
getExtras()
Returns the extras associated with this conference.
|
PhoneAccountHandle |
getPhoneAccountHandle()
Returns the
PhoneAccountHandle the conference call is being placed through. |
Connection |
getPrimaryConnection()
Retrieves the primary connection associated with the conference.
|
int |
getState()
Gets the state of the conference call.
|
StatusHints |
getStatusHints() |
String |
getTelecomCallId()
Returns the telecom internal call ID associated with this conference.
|
Connection.VideoProvider |
getVideoProvider()
Returns VideoProvider of the primary call.
|
int |
getVideoState()
Returns video state of the primary call.
|
void |
onAudioStateChanged(AudioState state)
Deprecated.
Use
onCallAudioStateChanged(CallAudioState) instead. |
void |
onCallAudioStateChanged(CallAudioState state)
Notifies the
Conference that the getCallAudioState() property has a new
value. |
void |
onConnectionAdded(Connection connection)
Notifies the
Conference that a Connection has been added to it. |
void |
onDisconnect()
Notifies the
Conference when the Conference and all it's Connection s should
be disconnected. |
void |
onExtrasChanged(Bundle extras)
Notifies this
Conference of a change to the extras made outside the
ConnectionService . |
void |
onHold()
Notifies the
Conference when it should be put on hold. |
void |
onMerge()
Notifies the
Conference when the child calls should be merged. |
void |
onMerge(Connection connection)
Notifies the
Conference when the specified Connection should merged with the
conference call. |
void |
onPlayDtmfTone(char c)
Notifies the
Conference of a request to play a DTMF tone. |
void |
onSeparate(Connection connection)
Notifies the
Conference when the specified Connection should be separated
from the conference call. |
void |
onStopDtmfTone()
Notifies the
Conference of a request to stop any currently playing DTMF tones. |
void |
onSwap()
Notifies the
Conference when the child calls should be swapped. |
void |
onUnhold()
Notifies the
Conference when it should be moved from a held to active state. |
void |
putExtra(String key,
boolean value)
Adds a boolean extra to this
Conference . |
void |
putExtra(String key,
int value)
Adds an integer extra to this
Conference . |
void |
putExtra(String key,
String value)
Adds a string extra to this
Conference . |
void |
putExtras(Bundle extras)
Adds some extras to this
Conference . |
void |
removeCapability(int capability)
Removes the specified capability from the set of capabilities of this
Conference . |
void |
removeConnection(Connection connection)
Removes the specified connection as a child of this conference.
|
void |
removeExtras(List<String> keys)
Removes extras from this
Conference . |
void |
removeExtras(String... keys)
Removes extras from this
Conference . |
Conference |
removeListener(Conference.Listener listener)
Removes the specified listener.
|
void |
setActive()
Sets state to be active.
|
void |
setConferenceableConnections(List<Connection> conferenceableConnections)
Sets the connections with which this connection can be conferenced.
|
void |
setConnectionCapabilities(int connectionCapabilities)
Sets the capabilities of a conference.
|
void |
setConnectionProperties(int connectionProperties)
Sets the properties of a conference.
|
void |
setConnectionTime(long connectionTimeMillis)
Sets the connection start time of the
Conference . |
void |
setConnectTimeMillis(long connectTimeMillis)
Deprecated.
|
void |
setDialing()
Sets state to be dialing.
|
void |
setDisconnected(DisconnectCause disconnectCause)
Sets state to disconnected.
|
void |
setExtras(Bundle extras)
Replaces all the extras associated with this
Conference . |
void |
setOnHold()
Sets state to be on hold.
|
void |
setStatusHints(StatusHints statusHints)
Sets the label and icon status to display in the InCall UI.
|
void |
setTelecomCallId(String telecomCallId)
Sets the telecom internal call ID associated with this conference.
|
void |
setVideoProvider(Connection c,
Connection.VideoProvider videoProvider)
Sets the video connection provider.
|
void |
setVideoState(Connection c,
int videoState)
Set the video state for the conference.
|
String |
toString()
Returns a string representation of the object.
|
public static final long CONNECT_TIME_NOT_SPECIFIED
public Conference(PhoneAccountHandle phoneAccount)
PhoneAccountHandle
phoneAccount
- The PhoneAccountHandle
associated with the conference.public final String getTelecomCallId()
public final void setTelecomCallId(String telecomCallId)
telecomCallId
- The telecom call ID.public final PhoneAccountHandle getPhoneAccountHandle()
PhoneAccountHandle
the conference call is being placed through.PhoneAccountHandle
object representing the PhoneAccount of the conference.public final List<Connection> getConnections()
Connection
objects which represent the children of the conference.public final int getState()
Connection
for valid values.public final int getConnectionCapabilities()
CAPABILITY_*
constants in class
Connection
for valid values.public final int getConnectionProperties()
PROPERTY_*
constants in class
Connection
for valid values.public static boolean can(int capabilities, int capability)
capabilities
- A capability bit field.capability
- The capability to check capabilities for.public boolean can(int capability)
Connection
supports the specified capability.capability
- The capability to check capabilities for.public void removeCapability(int capability)
Conference
.capability
- The capability to remove from the set.public void addCapability(int capability)
Conference
.capability
- The capability to add to the set.@Deprecated public final AudioState getAudioState()
getCallAudioState()
instead.null
if this Conference
does not directly know about its audio state.public final CallAudioState getCallAudioState()
null
if this Conference
does not directly know about its audio state.public Connection.VideoProvider getVideoProvider()
public int getVideoState()
public void onDisconnect()
Conference
when the Conference and all it's Connection
s should
be disconnected.public void onSeparate(Connection connection)
Conference
when the specified Connection
should be separated
from the conference call.connection
- The connection to separate.public void onMerge(Connection connection)
Conference
when the specified Connection
should merged with the
conference call.connection
- The Connection
to merge.public void onHold()
Conference
when it should be put on hold.public void onUnhold()
Conference
when it should be moved from a held to active state.public void onMerge()
Conference
when the child calls should be merged. Only invoked if the
conference contains the capability Connection.CAPABILITY_MERGE_CONFERENCE
.public void onSwap()
Conference
when the child calls should be swapped. Only invoked if the
conference contains the capability Connection.CAPABILITY_SWAP_CONFERENCE
.public void onPlayDtmfTone(char c)
Conference
of a request to play a DTMF tone.c
- A DTMF character.public void onStopDtmfTone()
Conference
of a request to stop any currently playing DTMF tones.@Deprecated public void onAudioStateChanged(AudioState state)
onCallAudioStateChanged(CallAudioState)
instead.Conference
that the getAudioState()
property has a new value.state
- The new call audio state.public void onCallAudioStateChanged(CallAudioState state)
Conference
that the getCallAudioState()
property has a new
value.state
- The new call audio state.public void onConnectionAdded(Connection connection)
Conference
that a Connection
has been added to it.connection
- The newly added connection.public final void setOnHold()
public final void setDialing()
public final void setActive()
public final void setDisconnected(DisconnectCause disconnectCause)
disconnectCause
- The reason for the disconnection, as described by
DisconnectCause
.public final DisconnectCause getDisconnectCause()
DisconnectCause
for this connection.public final void setConnectionCapabilities(int connectionCapabilities)
CAPABILITY_*
constants of class
Connection
for valid values.connectionCapabilities
- A bitmask of the Capabilities
of the conference call.public final void setConnectionProperties(int connectionProperties)
PROPERTY_*
constants of class
Connection
for valid values.connectionProperties
- A bitmask of the Properties
of the conference call.public final boolean addConnection(Connection connection)
connection
- The connection to add.public final void removeConnection(Connection connection)
connection
- The connection to remove.public final void setConferenceableConnections(List<Connection> conferenceableConnections)
conferenceableConnections
- The set of connections this connection can conference with.public final void setVideoState(Connection c, int videoState)
VideoProfile.STATE_AUDIO_ONLY
,
VideoProfile.STATE_BIDIRECTIONAL
,
VideoProfile.STATE_TX_ENABLED
,
VideoProfile.STATE_RX_ENABLED
.videoState
- The new video state.public final void setVideoProvider(Connection c, Connection.VideoProvider videoProvider)
videoProvider
- The video provider.public final List<Connection> getConferenceableConnections()
public final void destroy()
public final Conference addListener(Conference.Listener listener)
listener
- The new listener.public final Conference removeListener(Conference.Listener listener)
listener
- The listener to remove.public Connection getPrimaryConnection()
@Deprecated public final void setConnectTimeMillis(long connectTimeMillis)
setConnectionTime(long)
.public final void setConnectionTime(long connectionTimeMillis)
Conference
.connectionTimeMillis
- The connection time, in milliseconds.@Deprecated public final long getConnectTimeMillis()
getConnectionTime()
.public final long getConnectionTime()
Conference
, if specified. A value of
CONNECT_TIME_NOT_SPECIFIED
indicates that Telecom should determine the start time
of the conference.Conference
was connected.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public final void setStatusHints(StatusHints statusHints)
statusHints
- The status label and icon to set.public final StatusHints getStatusHints()
public final void setExtras(Bundle extras)
Conference
.
New or existing keys are replaced in the Conference
extras. Keys which are no longer
in the new extras, but were present the last time setExtras
was called are removed.
Alternatively you may use the putExtras(Bundle)
, and
removeExtras(String...)
methods to modify the extras.
No assumptions should be made as to how an In-Call UI or service will handle these extras. Keys should be fully qualified (e.g., com.example.extras.MY_EXTRA) to avoid conflicts.
extras
- The extras associated with this Conference
.public final void putExtras(Bundle extras)
Conference
. Existing keys are replaced and new ones are
added.
No assumptions should be made as to how an In-Call UI or service will handle these extras. Keys should be fully qualified (e.g., com.example.MY_EXTRA) to avoid conflicts.
extras
- The extras to add.public final void putExtra(String key, boolean value)
Conference
.key
- The extra key.value
- The value.public final void putExtra(String key, int value)
Conference
.key
- The extra key.value
- The value.public final void putExtra(String key, String value)
Conference
.key
- The extra key.value
- The value.public final void removeExtras(List<String> keys)
Conference
.keys
- The keys of the extras to remove.public final void removeExtras(String... keys)
Conference
.keys
- The keys of the extras to remove.public final Bundle getExtras()
Extras should be updated using putExtras(Bundle)
and removeExtras(List)
.
Telecom or an InCallService
can also update the extras via
Call.putExtras(Bundle)
, and
Call.removeExtras(List)
.
The conference is notified of changes to the extras made by Telecom or an
InCallService
by onExtrasChanged(Bundle)
.
public void onExtrasChanged(Bundle extras)
Conference
of a change to the extras made outside the
ConnectionService
.
These extras changes can originate from Telecom itself, or from an InCallService
via
Call.putExtras(Bundle)
, and
Call.removeExtras(List)
.
extras
- The new extras bundle.