Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3729088b authored by Hui Wang's avatar Hui Wang
Browse files

Update Telecom API for the integrated call logs

Flag: com.android.server.telecom.flags.integrated_call_logs
Bug: 407069563
Test: make
Change-Id: Ibaf69f21d51a711441d546bb4c81ef5205b79754
parent 61173642
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -44496,7 +44496,7 @@ package android.telecom {
    field public static final String EXTRA_ALWAYS_USE_VOIP_AUDIO_MODE = "android.telecom.extra.ALWAYS_USE_VOIP_AUDIO_MODE";
    field public static final String EXTRA_CALL_SUBJECT_CHARACTER_ENCODING = "android.telecom.extra.CALL_SUBJECT_CHARACTER_ENCODING";
    field public static final String EXTRA_CALL_SUBJECT_MAX_LENGTH = "android.telecom.extra.CALL_SUBJECT_MAX_LENGTH";
    field public static final String EXTRA_LOG_SELF_MANAGED_CALLS = "android.telecom.extra.LOG_SELF_MANAGED_CALLS";
    field @Deprecated @FlaggedApi("com.android.server.telecom.flags.integrated_call_logs") public static final String EXTRA_LOG_SELF_MANAGED_CALLS = "android.telecom.extra.LOG_SELF_MANAGED_CALLS";
    field public static final String EXTRA_SUPPORTS_HANDOVER_FROM = "android.telecom.extra.SUPPORTS_HANDOVER_FROM";
    field public static final String EXTRA_SUPPORTS_HANDOVER_TO = "android.telecom.extra.SUPPORTS_HANDOVER_TO";
    field public static final int NO_HIGHLIGHT_COLOR = 0; // 0x0
@@ -44732,6 +44732,7 @@ package android.telecom {
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void silenceRinger();
    method @RequiresPermission(android.Manifest.permission.CALL_PHONE) public void startConference(@NonNull java.util.List<android.net.Uri>, @NonNull android.os.Bundle);
    method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
    field @FlaggedApi("com.android.server.telecom.flags.integrated_call_logs") public static final String ACTION_CALL_BACK = "android.telecom.action.CALL_BACK";
    field public static final String ACTION_CHANGE_DEFAULT_DIALER = "android.telecom.action.CHANGE_DEFAULT_DIALER";
    field public static final String ACTION_CHANGE_PHONE_ACCOUNTS = "android.telecom.action.CHANGE_PHONE_ACCOUNTS";
    field public static final String ACTION_CONFIGURE_PHONE_ACCOUNT = "android.telecom.action.CONFIGURE_PHONE_ACCOUNT";
@@ -44779,6 +44780,7 @@ package android.telecom {
    field public static final String EXTRA_START_CALL_WITH_SPEAKERPHONE = "android.telecom.extra.START_CALL_WITH_SPEAKERPHONE";
    field public static final String EXTRA_START_CALL_WITH_VIDEO_STATE = "android.telecom.extra.START_CALL_WITH_VIDEO_STATE";
    field public static final String EXTRA_USE_ASSISTED_DIALING = "android.telecom.extra.USE_ASSISTED_DIALING";
    field @FlaggedApi("com.android.server.telecom.flags.integrated_call_logs") public static final String EXTRA_UUID = "android.telecom.extra.UUID";
    field public static final String GATEWAY_ORIGINAL_ADDRESS = "android.telecom.extra.GATEWAY_ORIGINAL_ADDRESS";
    field public static final String GATEWAY_PROVIDER_PACKAGE = "android.telecom.extra.GATEWAY_PROVIDER_PACKAGE";
    field public static final String METADATA_INCLUDE_EXTERNAL_CALLS = "android.telecom.INCLUDE_EXTERNAL_CALLS";
+4 −0
Original line number Diff line number Diff line
@@ -12335,6 +12335,10 @@ package android.provider {
    field public static final int ERROR_UNKNOWN = 0; // 0x0
  }
  public static class CallLog.Calls implements android.provider.BaseColumns {
    field @FlaggedApi("com.android.server.telecom.flags.integrated_call_logs") public static final String UUID = "uuid";
  }
  @Deprecated public static final class ContactsContract.MetadataSync implements android.provider.BaseColumns android.provider.ContactsContract.MetadataSyncColumns {
    field @Deprecated public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_metadata";
    field @Deprecated public static final String CONTENT_TYPE = "vnd.android.cursor.dir/contact_metadata";
+14 −0
Original line number Diff line number Diff line
@@ -1624,6 +1624,20 @@ public class CallLog {
        public static final String IS_PHONE_ACCOUNT_MIGRATION_PENDING =
                "is_call_log_phone_account_migration_pending";

        /**
         * Constant for the UUID column.
         *
         * This column contains the UUID generated by Telecom when adding the call, which is
         * a unique identifier associated with a call. Applications can retrieve the value
         * using {@link android.telecom.CallControl#getCallId()} during the call session.
         *
         * <p>Type: TEXT</p>
         * @hide
         */
        @SystemApi
        @FlaggedApi(Flags.FLAG_INTEGRATED_CALL_LOGS)
        public static final String UUID = "uuid";

        /**
         * The default maximum number of call log entries stored in the call log provider for each
         * {@link PhoneAccountHandle}.
+3 −0
Original line number Diff line number Diff line
@@ -157,7 +157,10 @@ public final class PhoneAccount implements Parcelable {
     * <p>
     * Note: Only calls where the {@link Call.Details#getHandle()} {@link Uri#getScheme()} is
     * {@link #SCHEME_SIP} or {@link #SCHEME_TEL} will be logged at the current time.
     * @deprecated Register {@link TelecomManager#ACTION_CALL_BACK} instead.
     */
    @FlaggedApi(com.android.server.telecom.flags.Flags.FLAG_INTEGRATED_CALL_LOGS)
    @Deprecated
    public static final String EXTRA_LOG_SELF_MANAGED_CALLS =
            "android.telecom.extra.LOG_SELF_MANAGED_CALLS";

+41 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@ import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.RequiresFeature;
import android.annotation.RequiresPermission;
import android.annotation.SdkConstant;
import android.annotation.SdkConstant.SdkConstantType;
import android.annotation.SuppressAutoDoc;
import android.annotation.SuppressLint;
import android.annotation.SystemApi;
@@ -200,6 +202,19 @@ public class TelecomManager {
    public static final String ACTION_DEFAULT_DIALER_CHANGED =
            "android.telecom.action.DEFAULT_DIALER_CHANGED";

    /**
     * Activity action: Triggers the calling UI and initiates a call back to a previous call
     * made by the application. The specific call to be re-called is identified by the UUID,
     * which must be included as an extra in the intent using {@link #EXTRA_UUID}
     * <p>
     * Note: VoIP apps should register the intent if they need to integrate the call history
     * into the system call logs.
     * <p>
     */
    @FlaggedApi(Flags.FLAG_INTEGRATED_CALL_LOGS)
    @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
    public static final String ACTION_CALL_BACK = "android.telecom.action.CALL_BACK";

    /**
     * Extra value used to provide the package name for {@link #ACTION_CHANGE_DEFAULT_DIALER}.
     */
@@ -294,6 +309,25 @@ public class TelecomManager {
     */
    public static final String EXTRA_CALL_SUBJECT = "android.telecom.extra.CALL_SUBJECT";

    /**
     * Extra used with {@link #ACTION_CALL_BACK} to specify the UUID value representing
     * the call ID returned by {@link android.telecom.CallControl#getCallId()}.
     *
     * <p>This extra is required when using {@link #ACTION_CALL_BACK} to initiate a callback
     * to a specific call.</p>
     *
     * <p>Type: String</p>
     *
     * <p>Applications that support the {@link #ACTION_CALL_BACK} intent should obtain
     * the UUID value by calling {@link android.telecom.CallControl#getCallId()} during
     * the initial call and persist this UUID along with other call-related information.
     * When receiving the UUID via the {@link #ACTION_CALL_BACK} intent, the application
     * should retrieve the corresponding call information using the provided UUID and
     * initiate a new call using the stored details.</p>
     */
    @FlaggedApi(Flags.FLAG_INTEGRATED_CALL_LOGS)
    public static final String EXTRA_UUID = "android.telecom.extra.UUID";

    // Values for EXTRA_PRIORITY
    /**
     * Indicates the call composer call priority is normal.
@@ -2528,6 +2562,13 @@ public class TelecomManager {
     * call forwarding MMI code is placed by an application that is not in one of these roles, the
     * dialer will be launched with a UI showing the MMI code already populated so that the user can
     * confirm the action before the call is placed.
     * <p><b>Note</b>: The dialer application may set the URI parameter of address to specify
     * a call log record. This allows the dialer to launch a related application to initiate
     * a callback for a specific call log entry. The dialer must have the READ_CALL_LOGS permission
     * to access call log records. The ContentUri for a specific call log record can be obtained
     * by {@link android.content.ContentUri#withAppendedId(CallLog.Calls.CONTENT_URI, callLogId)},
     * where callLogId is the {@link android.provider.BaseColumns#_ID} of the call log record.

     * @param address The address to make the call to.
     * @param extras Bundle of extras to use with the call.
     */