diff options
author | Tyler Gunn <tgunn@google.com> | 2015-09-01 10:59:48 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2015-09-01 10:59:48 -0700 |
commit | f0500bd63571c667df7865d7484c89f671382711 (patch) | |
tree | 49ffeed5fe1888d01124a9c95270d3c169ba9d4d /telecomm/java/android/telecom/ConnectionRequest.java | |
parent | 8e88b378336d83b5d026b9cd1a0c1cd6703f7369 (diff) |
Support for Telecom Call IDs.
Add support for caching telecom call ID in connection and conference
classes.
Enhance connection service call ID generation:
For "existing calls", the connection service will try to use a call ID
of the format ClassName@ID
Where ClassName is the ComponentName of the connection service, and ID
is a unique incrementing ID for the connection service.
Bug: 23357902
Change-Id: I2284b018465e2b330fc8a3b556758e9f34a2daba
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionRequest.java')
-rw-r--r-- | telecomm/java/android/telecom/ConnectionRequest.java | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/ConnectionRequest.java b/telecomm/java/android/telecom/ConnectionRequest.java index 686321476bd1..aba38fe8a376 100644 --- a/telecomm/java/android/telecom/ConnectionRequest.java +++ b/telecomm/java/android/telecom/ConnectionRequest.java @@ -32,6 +32,7 @@ public final class ConnectionRequest implements Parcelable { private final Uri mAddress; private final Bundle mExtras; private final int mVideoState; + private final String mTelecomCallId; /** * @param accountHandle The accountHandle which should be used to place the call. @@ -42,7 +43,7 @@ public final class ConnectionRequest implements Parcelable { PhoneAccountHandle accountHandle, Uri handle, Bundle extras) { - this(accountHandle, handle, extras, VideoProfile.STATE_AUDIO_ONLY); + this(accountHandle, handle, extras, VideoProfile.STATE_AUDIO_ONLY, null); } /** @@ -56,10 +57,28 @@ public final class ConnectionRequest implements Parcelable { Uri handle, Bundle extras, int videoState) { + this(accountHandle, handle, extras, videoState, null); + } + + /** + * @param accountHandle The accountHandle which should be used to place the call. + * @param handle The handle (e.g., phone number) to which the {@link Connection} is to connect. + * @param extras Application-specific extra data. + * @param videoState Determines the video state for the connection. + * @param telecomCallId The telecom call ID. + * @hide + */ + public ConnectionRequest( + PhoneAccountHandle accountHandle, + Uri handle, + Bundle extras, + int videoState, + String telecomCallId) { mAccountHandle = accountHandle; mAddress = handle; mExtras = extras; mVideoState = videoState; + mTelecomCallId = telecomCallId; } private ConnectionRequest(Parcel in) { @@ -67,6 +86,7 @@ public final class ConnectionRequest implements Parcelable { mAddress = in.readParcelable(getClass().getClassLoader()); mExtras = in.readParcelable(getClass().getClassLoader()); mVideoState = in.readInt(); + mTelecomCallId = in.readString(); } /** @@ -99,6 +119,16 @@ public final class ConnectionRequest implements Parcelable { return mVideoState; } + /** + * Returns the internal Telecom ID associated with the connection request. + * + * @return The Telecom ID. + * @hide + */ + public String getTelecomCallId() { + return mTelecomCallId; + } + @Override public String toString() { return String.format("ConnectionRequest %s %s", @@ -134,5 +164,6 @@ public final class ConnectionRequest implements Parcelable { destination.writeParcelable(mAddress, 0); destination.writeParcelable(mExtras, 0); destination.writeInt(mVideoState); + destination.writeString(mTelecomCallId); } } |