diff options
author | Danny Baumann <dannybaumann@web.de> | 2014-11-13 14:28:53 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-12-15 04:43:19 -0800 |
commit | 9427c1ab15ce6a4c74dabbc63c52c28825a53128 (patch) | |
tree | d1421d2d46d89f66964704f97ba3b5e56edc4781 /telecomm/java/android/telecom/RemoteConnection.java | |
parent | 39f4239dd85cf0dc8bc222b9656c098fb3b131d9 (diff) | |
download | frameworks_base-9427c1ab15ce6a4c74dabbc63c52c28825a53128.zip frameworks_base-9427c1ab15ce6a4c74dabbc63c52c28825a53128.tar.gz frameworks_base-9427c1ab15ce6a4c74dabbc63c52c28825a53128.tar.bz2 |
Proper supplementary service notification handling (1/5).
Change-Id: I4fa94d4ba68a1570d3f822be569ae124882c0e66
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. |