summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Grant Menke <grantmenke@google.com> 2023-07-24 15:19:36 -0700
committer Grant Menke <grantmenke@google.com> 2023-07-24 15:56:14 -0700
commit626dd261c5857aaf9607b9db3250acad972a7ec1 (patch)
treece3c3fca7927f00e68a5b363ab1833579aa508cd
parent3fda969b06f866f903015645977c17c2d3c282b6 (diff)
Add API to get the telecom call id from Call.Details.
This CL unhides StreamingCall#EXTRA_CALL_ID and adds an API to Call Details to get the telecom call ID. Updated CTS tests accordingly to account for these changes. Fixes: 286457948 Test: atest CallDetailsTest && atest CallStreamingTest Change-Id: Ibf9dbe38224b9710eb79aa68812f3a185f7e297d
-rw-r--r--core/api/current.txt1
-rw-r--r--core/api/system-current.txt1
-rw-r--r--telecomm/java/android/telecom/Call.java6
-rw-r--r--telecomm/java/android/telecom/StreamingCall.java1
4 files changed, 8 insertions, 1 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index d03122d14be9..e6c324eb766c 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -42141,6 +42141,7 @@ package android.telecom {
method public android.telecom.GatewayInfo getGatewayInfo();
method public android.net.Uri getHandle();
method public int getHandlePresentation();
+ method @NonNull public String getId();
method public android.os.Bundle getIntentExtras();
method public final int getState();
method public android.telecom.StatusHints getStatusHints();
diff --git a/core/api/system-current.txt b/core/api/system-current.txt
index b22884f4dcb4..134786f6c972 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -13730,6 +13730,7 @@ package android.telecom {
method public void requestStreamingState(int);
method public void writeToParcel(@NonNull android.os.Parcel, int);
field @NonNull public static final android.os.Parcelable.Creator<android.telecom.StreamingCall> CREATOR;
+ field public static final String EXTRA_CALL_ID = "android.telecom.extra.CALL_ID";
field public static final int STATE_DISCONNECTED = 3; // 0x3
field public static final int STATE_HOLDING = 2; // 0x2
field public static final int STATE_STREAMING = 1; // 0x1
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index 1da4ea92c8f7..78b86d398718 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -936,6 +936,12 @@ public final class Call {
return mState;
}
+ /**
+ * @return the Telecom identifier associated with this {@link Call} . This is not a stable
+ * identifier and is not guaranteed to be unique across device reboots.
+ */
+ public @NonNull String getId() { return mTelecomCallId; }
+
/** {@hide} */
@TestApi
public String getTelecomCallId() {
diff --git a/telecomm/java/android/telecom/StreamingCall.java b/telecomm/java/android/telecom/StreamingCall.java
index 3319fc117b4d..29f436d9f459 100644
--- a/telecomm/java/android/telecom/StreamingCall.java
+++ b/telecomm/java/android/telecom/StreamingCall.java
@@ -56,7 +56,6 @@ public final class StreamingCall implements Parcelable {
/**
* The ID associated with this call. This is the same value as {@link CallControl#getCallId()}.
- * @hide
*/
public static final String EXTRA_CALL_ID = "android.telecom.extra.CALL_ID";