Guarded relevant call id API changes with flagging.
This change guards CallDetails#getId and StreamingCall#EXTRA_CALL_ID with the newly added telecom flag FLAG_CALL_DETAILS_ID_CHANGES.
Bug: 301713560
Test: Updated CallDetailsTest#testCallId and CallStreamingTest
Change-Id: I3819fa9eda5995d7ef354e71d2b4c7d5a4423e66
diff --git a/core/api/current.txt b/core/api/current.txt
index 5a1561a..1af70a7 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -41557,7 +41557,7 @@
method public android.telecom.GatewayInfo getGatewayInfo();
method public android.net.Uri getHandle();
method public int getHandlePresentation();
- method @NonNull public String getId();
+ method @FlaggedApi("com.android.server.telecom.flags.call_details_id_changes") @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 a99eeb0..77efa8a 100644
--- a/core/api/system-current.txt
+++ b/core/api/system-current.txt
@@ -13228,7 +13228,7 @@
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 @FlaggedApi("com.android.server.telecom.flags.call_details_id_changes") 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 a7675d6..def52a5 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -942,6 +942,7 @@
* @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.
*/
+ @FlaggedApi(Flags.FLAG_CALL_DETAILS_ID_CHANGES)
public @NonNull String getId() { return mTelecomCallId; }
/** {@hide} */
diff --git a/telecomm/java/android/telecom/StreamingCall.java b/telecomm/java/android/telecom/StreamingCall.java
index 29f436d..ad1b6f9 100644
--- a/telecomm/java/android/telecom/StreamingCall.java
+++ b/telecomm/java/android/telecom/StreamingCall.java
@@ -16,6 +16,7 @@
package android.telecom;
+import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.SystemApi;
@@ -25,6 +26,8 @@
import android.os.Parcel;
import android.os.Parcelable;
+import com.android.server.telecom.flags.Flags;
+
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -57,6 +60,7 @@
/**
* The ID associated with this call. This is the same value as {@link CallControl#getCallId()}.
*/
+ @FlaggedApi(Flags.FLAG_CALL_DETAILS_ID_CHANGES)
public static final String EXTRA_CALL_ID = "android.telecom.extra.CALL_ID";
/**