From 0ba7907d4af1d2ae4593bd3c136d75af7c4ff7c8 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Tue, 2 Mar 2021 09:19:55 -0800 Subject: [PATCH] Add Device to Device communication carrier configs. Key configurations required: - Whether carrier supports using DTMF A-D digit D2D comms. - Whether carrier supports using RTP header extensions for D2D. - If using RTP header extensions, whether SDP negotiation of the RTP header extensions is supported or not. Test: Add unit tests for new carrier config functionality. Test: Manual test using telephony cmds to enable/disable the various config options. Bug: 163085177 Change-Id: I7422b90e655ef190d474cc12d1becee3074f657b --- core/api/current.txt | 3 ++ .../telephony/CarrierConfigManager.java | 35 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/core/api/current.txt b/core/api/current.txt index 922d8116d9fbe..a3cc373ecc960 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -40532,6 +40532,9 @@ package android.telephony { field public static final String KEY_SIM_NETWORK_UNLOCK_ALLOW_DISMISS_BOOL = "sim_network_unlock_allow_dismiss_bool"; field public static final String KEY_SMS_REQUIRES_DESTINATION_NUMBER_CONVERSION_BOOL = "sms_requires_destination_number_conversion_bool"; field public static final String KEY_SUPPORTS_CALL_COMPOSER_BOOL = "supports_call_composer_bool"; + field public static final String KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_DTMF_BOOL = "supports_device_to_device_communication_using_dtmf_bool"; + field public static final String KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL = "supports_device_to_device_communication_using_rtp_bool"; + field public static final String KEY_SUPPORTS_SDP_NEGOTIATION_OF_D2D_RTP_HEADER_EXTENSIONS_BOOL = "supports_sdp_negotiation_of_d2d_rtp_header_extensions_bool"; field public static final String KEY_SUPPORT_3GPP_CALL_FORWARDING_WHILE_ROAMING_BOOL = "support_3gpp_call_forwarding_while_roaming_bool"; field public static final String KEY_SUPPORT_ADD_CONFERENCE_PARTICIPANTS_BOOL = "support_add_conference_participants_bool"; field public static final String KEY_SUPPORT_ADHOC_CONFERENCE_CALLS_BOOL = "support_adhoc_conference_calls_bool"; diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index b52f49190679f..e009aa3caeb61 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -1340,6 +1340,38 @@ public class CarrierConfigManager { public static final String KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_ON_PEER_BOOL = "support_ims_conference_event_package_on_peer_bool"; + /** + * Indicates whether the carrier supports the use of RFC8285 compliant RTP header extensions for + * the purpose of device to device communication while in a call. + *

+ * See also {@link #KEY_SUPPORTS_SDP_NEGOTIATION_OF_D2D_RTP_HEADER_EXTENSIONS_BOOL}. + */ + public static final String KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL = + "supports_device_to_device_communication_using_rtp_bool"; + + /** + * Indicates whether the carrier supports the negotiations of RFC8285 compliant RTP header + * extensions supported on a call during the Session Description Protocol (SDP). This option + * is only used when {@link #KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL} is + * {@code true}. + *

+ * When {@code true}, the RTP header extensions the platform uses for device to device + * communication will be offered to the remote end during the SDP negotiation process. + * When {@code false}, the RTP header extensions will not be negotiated during the SDP + * negotiation process and the platform will send RTP header extensions without prior + * negotiation if {@link #KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL} is + * {@code true}. + */ + public static final String KEY_SUPPORTS_SDP_NEGOTIATION_OF_D2D_RTP_HEADER_EXTENSIONS_BOOL = + "supports_sdp_negotiation_of_d2d_rtp_header_extensions_bool"; + + /** + * Indicates whether the carrier supports the use of DTMF digits A-D for the purpose of device + * to device communication while in a call. + */ + public static final String KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_DTMF_BOOL = + "supports_device_to_device_communication_using_dtmf_bool"; + /** * Determines whether High Definition audio property is displayed in the dialer UI. * If {@code false}, remove the HD audio property from the connection so that HD audio related @@ -5011,6 +5043,9 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_SUPPORT_MANAGE_IMS_CONFERENCE_CALL_BOOL, true); sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_BOOL, true); sDefaults.putBoolean(KEY_SUPPORT_IMS_CONFERENCE_EVENT_PACKAGE_ON_PEER_BOOL, true); + sDefaults.putBoolean(KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_RTP_BOOL, false); + sDefaults.putBoolean(KEY_SUPPORTS_SDP_NEGOTIATION_OF_D2D_RTP_HEADER_EXTENSIONS_BOOL, false); + sDefaults.putBoolean(KEY_SUPPORTS_DEVICE_TO_DEVICE_COMMUNICATION_USING_DTMF_BOOL, false); sDefaults.putBoolean(KEY_SUPPORT_VIDEO_CONFERENCE_CALL_BOOL, false); sDefaults.putBoolean(KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL, false); sDefaults.putInt(KEY_IMS_CONFERENCE_SIZE_LIMIT_INT, 5);