diff options
Diffstat (limited to 'telecomm/java/android/telecom/RemoteConnection.java')
-rw-r--r-- | telecomm/java/android/telecom/RemoteConnection.java | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/telecomm/java/android/telecom/RemoteConnection.java b/telecomm/java/android/telecom/RemoteConnection.java index f960959..4371367 100644 --- a/telecomm/java/android/telecom/RemoteConnection.java +++ b/telecomm/java/android/telecom/RemoteConnection.java @@ -90,6 +90,18 @@ public final class RemoteConnection { int connectionCapabilities) {} /** + * Indicates that the call properties of this {@code RemoteConnection} have changed. + * See {@link #getConnectionProperties()}. + * + * @param connection The {@code RemoteConnection} invoking this method. + * @param connectionProperties The new properties of the {@code RemoteConnection}. + * @hide + */ + public void onConnectionPropertiesChanged( + RemoteConnection connection, + int connectionProperties) {} + + /** * Invoked when the post-dial sequence in the outgoing {@code Connection} has reached a * pause character. This causes the post-dial signals to stop pending user confirmation. An * implementation should present this choice to the user and invoke @@ -577,6 +589,7 @@ public final class RemoteConnection { private boolean mRingbackRequested; private boolean mConnected; private int mConnectionCapabilities; + private int mConnectionProperties; private int mVideoState; private VideoProvider mVideoProvider; private boolean mIsVoipAudioMode; @@ -613,6 +626,7 @@ public final class RemoteConnection { mDisconnectCause = connection.getDisconnectCause(); mRingbackRequested = connection.isRingbackRequested(); mConnectionCapabilities = connection.getConnectionCapabilities(); + mConnectionProperties = connection.getConnectionProperties(); mVideoState = connection.getVideoState(); mVideoProvider = new RemoteConnection.VideoProvider(connection.getVideoProvider()); mIsVoipAudioMode = connection.getIsVoipAudioMode(); @@ -708,6 +722,15 @@ public final class RemoteConnection { } /** + * @return A bitmask of the properties of the {@code RemoteConnection}, as defined in + * the {@code PROPERTY_*} constants in class {@link Connection}. + * @hide + */ + public int getConnectionProperties() { + return mConnectionProperties; + } + + /** * Determines if the audio mode of this {@code RemoteConnection} is VOIP. * * @return {@code true} if the {@code RemoteConnection}'s current audio mode is VOIP. @@ -1089,6 +1112,23 @@ public final class RemoteConnection { /** * @hide */ + void setConnectionProperties(final int connectionProperties) { + mConnectionProperties = connectionProperties; + for (CallbackRecord record : mCallbackRecords) { + final RemoteConnection connection = this; + final Callback callback = record.getCallback(); + record.getHandler().post(new Runnable() { + @Override + public void run() { + callback.onConnectionPropertiesChanged(connection, connectionProperties); + } + }); + } + } + + /** + * @hide + */ void setDestroyed() { if (!mCallbackRecords.isEmpty()) { // Make sure that the callbacks are notified that the call is destroyed first. |