summaryrefslogtreecommitdiff
path: root/telecomm/java/android/telecom/ConnectionRequest.java
diff options
context:
space:
mode:
Diffstat (limited to 'telecomm/java/android/telecom/ConnectionRequest.java')
-rw-r--r--telecomm/java/android/telecom/ConnectionRequest.java33
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);
}
}