Add connection properties to Connections.

- Per suggestion of API council, moving properties of a Connection from
CAPABILITIES_* to PROPERTIES_*.

Bug: 27458894
Change-Id: Icce921b03cda514a991646ed39a26559c7e91230
This commit is contained in:
Tyler Gunn
2016-03-22 09:02:47 -07:00
parent 2dc6cc9aa4
commit 720c664401
16 changed files with 352 additions and 58 deletions

View File

@@ -53,6 +53,8 @@ public abstract class Conference extends Conferenceable {
public void onDestroyed(Conference conference) {}
public void onConnectionCapabilitiesChanged(
Conference conference, int connectionCapabilities) {}
public void onConnectionPropertiesChanged(
Conference conference, int connectionProperties) {}
public void onVideoStateChanged(Conference c, int videoState) { }
public void onVideoProviderChanged(Conference c, Connection.VideoProvider videoProvider) {}
public void onStatusHintsChanged(Conference conference, StatusHints statusHints) {}
@@ -74,6 +76,7 @@ public abstract class Conference extends Conferenceable {
private int mState = Connection.STATE_NEW;
private DisconnectCause mDisconnectCause;
private int mConnectionCapabilities;
private int mConnectionProperties;
private String mDisconnectMessage;
private long mConnectTimeMillis = CONNECT_TIME_NOT_SPECIFIED;
private StatusHints mStatusHints;
@@ -155,6 +158,16 @@ public abstract class Conference extends Conferenceable {
return mConnectionCapabilities;
}
/**
* Returns the properties of the conference. See {@code PROPERTY_*} constants in class
* {@link Connection} for valid values.
*
* @return A bitmask of the properties of the conference call.
*/
public final int getConnectionProperties() {
return mConnectionProperties;
}
/**
* Whether the given capabilities support the specified capability.
*
@@ -364,7 +377,7 @@ public abstract class Conference extends Conferenceable {
* Sets the capabilities of a conference. See {@code CAPABILITY_*} constants of class
* {@link Connection} for valid values.
*
* @param connectionCapabilities A bitmask of the {@code PhoneCapabilities} of the conference call.
* @param connectionCapabilities A bitmask of the {@code Capabilities} of the conference call.
*/
public final void setConnectionCapabilities(int connectionCapabilities) {
if (connectionCapabilities != mConnectionCapabilities) {
@@ -376,6 +389,22 @@ public abstract class Conference extends Conferenceable {
}
}
/**
* Sets the properties of a conference. See {@code PROPERTY_*} constants of class
* {@link Connection} for valid values.
*
* @param connectionProperties A bitmask of the {@code Properties} of the conference call.
*/
public final void setConnectionProperties(int connectionProperties) {
if (connectionProperties != mConnectionProperties) {
mConnectionProperties = connectionProperties;
for (Listener l : mListeners) {
l.onConnectionPropertiesChanged(this, mConnectionProperties);
}
}
}
/**
* Adds the specified connection as a child of this conference.
*