diff options
author | 2024-01-26 14:42:09 -0800 | |
---|---|---|
committer | 2024-01-26 14:42:09 -0800 | |
commit | e045e66a4fd6e5632f15a4b24d1be97792108fdd (patch) | |
tree | 5d71a999f6ba047ad67a768ef0d4b1c23edf68e7 | |
parent | 2ce52b3f2dd205a6dd8cc4ec24e443d71d745519 (diff) |
Formalize CallDirection APIs
Promote Connection#getCallDirection into a proper system API as part of
Telecom internal mainline prep (used by Telephony to get call direction
of the connection).
Bug: 322514233
Bug: 311773409
Test: atest ConnectionServiceTest
Change-Id: I36acd83503148a7919518dd26f06d5aca0b49b86
-rw-r--r-- | core/api/system-current.txt | 1 | ||||
-rw-r--r-- | telecomm/java/android/telecom/Connection.java | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/api/system-current.txt b/core/api/system-current.txt index debf1bfdfc8c..8053c11cde7e 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -13383,6 +13383,7 @@ package android.telecom { public abstract class Connection extends android.telecom.Conferenceable { method @Deprecated public final android.telecom.AudioState getAudioState(); + method @FlaggedApi("com.android.server.telecom.flags.telecom_resolve_hidden_dependencies") public final int getCallDirection(); method @IntRange(from=0) public final long getConnectTimeMillis(); method public final long getConnectionStartElapsedRealtimeMillis(); method @Nullable public android.telecom.PhoneAccountHandle getPhoneAccountHandle(); diff --git a/telecomm/java/android/telecom/Connection.java b/telecomm/java/android/telecom/Connection.java index a2105b02b97a..9ee48d85a600 100644 --- a/telecomm/java/android/telecom/Connection.java +++ b/telecomm/java/android/telecom/Connection.java @@ -21,6 +21,7 @@ import static android.Manifest.permission.MODIFY_PHONE_STATE; import android.Manifest; import android.annotation.CallbackExecutor; import android.annotation.ElapsedRealtimeLong; +import android.annotation.FlaggedApi; import android.annotation.IntDef; import android.annotation.IntRange; import android.annotation.NonNull; @@ -56,6 +57,7 @@ import android.view.Surface; import com.android.internal.os.SomeArgs; import com.android.internal.telecom.IVideoCallback; import com.android.internal.telecom.IVideoProvider; +import com.android.server.telecom.flags.Flags; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -4019,9 +4021,12 @@ public abstract class Connection extends Conferenceable { } /** + * Retrieves the direction of this connection. * @return The direction of the call. * @hide */ + @SystemApi + @FlaggedApi(Flags.FLAG_TELECOM_RESOLVE_HIDDEN_DEPENDENCIES) public final @Call.Details.CallDirection int getCallDirection() { return mCallDirection; } |