diff options
Diffstat (limited to 'telecomm/java/android/telecom/Conference.java')
| -rw-r--r-- | telecomm/java/android/telecom/Conference.java | 88 |
1 files changed, 66 insertions, 22 deletions
diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java index 0424548..d8d9ab6 100644 --- a/telecomm/java/android/telecom/Conference.java +++ b/telecomm/java/android/telecom/Conference.java @@ -16,6 +16,7 @@ package android.telecom; +import android.annotation.SystemApi; import android.telecom.Connection.VideoProvider; import java.util.ArrayList; @@ -62,7 +63,7 @@ public abstract class Conference implements Conferenceable { Collections.unmodifiableList(mConferenceableConnections); private PhoneAccountHandle mPhoneAccount; - private AudioState mAudioState; + private CallAudioState mCallAudioState; private int mState = Connection.STATE_NEW; private DisconnectCause mDisconnectCause; private int mConnectionCapabilities; @@ -116,7 +117,7 @@ public abstract class Conference implements Conferenceable { } /** - * Returns the capabilities of a conference. See {@code CAPABILITY_*} constants in class + * Returns the capabilities of the conference. See {@code CAPABILITY_*} constants in class * {@link Connection} for valid values. * * @return A bitmask of the capabilities of the conference call. @@ -172,14 +173,26 @@ public abstract class Conference implements Conferenceable { * @return The audio state of the conference, describing how its audio is currently * being routed by the system. This is {@code null} if this Conference * does not directly know about its audio state. + * @deprecated Use {@link #getCallAudioState()} instead. + * @hide */ + @Deprecated + @SystemApi public final AudioState getAudioState() { - return mAudioState; + return new AudioState(mCallAudioState); + } + + /** + * @return The audio state of the conference, describing how its audio is currently + * being routed by the system. This is {@code null} if this Conference + * does not directly know about its audio state. + */ + public final CallAudioState getCallAudioState() { + return mCallAudioState; } /** * Returns VideoProvider of the primary call. This can be null. - * @hide */ public VideoProvider getVideoProvider() { return null; @@ -187,7 +200,6 @@ public abstract class Conference implements Conferenceable { /** * Returns video state of the primary call. - * @hide */ public int getVideoState() { return VideoProfile.VideoState.AUDIO_ONLY; @@ -250,10 +262,21 @@ public abstract class Conference implements Conferenceable { * Notifies this conference that the {@link #getAudioState()} property has a new value. * * @param state The new call audio state. + * @deprecated Use {@link #onCallAudioStateChanged(CallAudioState)} instead. + * @hide */ + @SystemApi + @Deprecated public void onAudioStateChanged(AudioState state) {} /** + * Notifies this conference that the {@link #getCallAudioState()} property has a new value. + * + * @param state The new call audio state. + */ + public void onCallAudioStateChanged(CallAudioState state) {} + + /** * Notifies this conference that a connection has been added to it. * * @param connection The newly added connection. @@ -367,13 +390,12 @@ public abstract class Conference implements Conferenceable { /** * Set the video state for the conference. - * Valid values: {@link VideoProfile.VideoState#AUDIO_ONLY}, - * {@link VideoProfile.VideoState#BIDIRECTIONAL}, - * {@link VideoProfile.VideoState#TX_ENABLED}, - * {@link VideoProfile.VideoState#RX_ENABLED}. + * Valid values: {@link VideoProfile#STATE_AUDIO_ONLY}, + * {@link VideoProfile#STATE_BIDIRECTIONAL}, + * {@link VideoProfile#STATE_TX_ENABLED}, + * {@link VideoProfile#STATE_RX_ENABLED}. * * @param videoState The new video state. - * @hide */ public final void setVideoState(Connection c, int videoState) { Log.d(this, "setVideoState Conference: %s Connection: %s VideoState: %s", @@ -387,7 +409,6 @@ public abstract class Conference implements Conferenceable { * Sets the video connection provider. * * @param videoProvider The video provider. - * @hide */ public final void setVideoProvider(Connection c, Connection.VideoProvider videoProvider) { Log.d(this, "setVideoProvider Conference: %s Connection: %s VideoState: %s", @@ -462,7 +483,9 @@ public abstract class Conference implements Conferenceable { * the connection from which the conference will retrieve its current state. * * @return The primary connection. + * @hide */ + @SystemApi public Connection getPrimaryConnection() { if (mUnmodifiableChildConnections == null || mUnmodifiableChildConnections.isEmpty()) { return null; @@ -471,22 +494,42 @@ public abstract class Conference implements Conferenceable { } /** - * Sets the connect time of the {@code Conference}. + * @hide + * @deprecated Use {@link #setConnectionTime}. + */ + @Deprecated + @SystemApi + public final void setConnectTimeMillis(long connectTimeMillis) { + setConnectionTime(connectTimeMillis); + } + + /** + * Sets the connection start time of the {@code Conference}. * - * @param connectTimeMillis The connection time, in milliseconds. + * @param connectionTimeMillis The connection time, in milliseconds. */ - public void setConnectTimeMillis(long connectTimeMillis) { - mConnectTimeMillis = connectTimeMillis; + public final void setConnectionTime(long connectionTimeMillis) { + mConnectTimeMillis = connectionTimeMillis; } /** - * Retrieves the connect time of the {@code Conference}, if specified. A value of + * @hide + * @deprecated Use {@link #getConnectionTime}. + */ + @Deprecated + @SystemApi + public final long getConnectTimeMillis() { + return getConnectionTime(); + } + + /** + * Retrieves the connection start 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 The time the {@code Conference} has been connected. + * @return The time at which the {@code Conference} was connected. */ - public final long getConnectTimeMillis() { + public final long getConnectionTime() { return mConnectTimeMillis; } @@ -496,10 +539,11 @@ public abstract class Conference implements Conferenceable { * @param state The new audio state. * @hide */ - final void setAudioState(AudioState state) { - Log.d(this, "setAudioState %s", state); - mAudioState = state; - onAudioStateChanged(state); + final void setCallAudioState(CallAudioState state) { + Log.d(this, "setCallAudioState %s", state); + mCallAudioState = state; + onAudioStateChanged(getAudioState()); + onCallAudioStateChanged(state); } private void setState(int newState) { |
