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:
@@ -91,6 +91,18 @@ public final class RemoteConference {
|
||||
RemoteConference conference,
|
||||
int connectionCapabilities) {}
|
||||
|
||||
/**
|
||||
* Indicates that the call properties of this {@code RemoteConference} have changed.
|
||||
* See {@link #getConnectionProperties()}.
|
||||
*
|
||||
* @param conference The {@code RemoteConference} invoking this method.
|
||||
* @param connectionProperties The new properties of the {@code RemoteConference}.
|
||||
*/
|
||||
public void onConnectionPropertiesChanged(
|
||||
RemoteConference conference,
|
||||
int connectionProperties) {}
|
||||
|
||||
|
||||
/**
|
||||
* Invoked when the set of {@link RemoteConnection}s which can be added to this conference
|
||||
* call have changed.
|
||||
@@ -133,6 +145,7 @@ public final class RemoteConference {
|
||||
private int mState = Connection.STATE_NEW;
|
||||
private DisconnectCause mDisconnectCause;
|
||||
private int mConnectionCapabilities;
|
||||
private int mConnectionProperties;
|
||||
private Bundle mExtras;
|
||||
|
||||
/** @hide */
|
||||
@@ -243,6 +256,24 @@ public final class RemoteConference {
|
||||
}
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
void setConnectionProperties(final int connectionProperties) {
|
||||
if (mConnectionProperties != connectionProperties) {
|
||||
mConnectionProperties = connectionProperties;
|
||||
for (CallbackRecord<Callback> record : mCallbackRecords) {
|
||||
final RemoteConference conference = this;
|
||||
final Callback callback = record.getCallback();
|
||||
record.getHandler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
callback.onConnectionPropertiesChanged(
|
||||
conference, mConnectionProperties);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
void setConferenceableConnections(List<RemoteConnection> conferenceableConnections) {
|
||||
mConferenceableConnections.clear();
|
||||
@@ -341,6 +372,16 @@ public final class RemoteConference {
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the extras associated with this {@code RemoteConnection}.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user