From ec5b6e32327890222302c509c1ef58480cf7bab7 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Thu, 1 Dec 2016 19:40:30 -0800 Subject: [PATCH] Add carrier configuration options to allow enforcing max conference size. Adding carrier config options to to allow enforcing a maxmimum size for IMS conferences. Also adding small performance enhancement to setConferenceables so that if the list of conferenceable connections does not change it does not send an update to listeners. Test: Manual Bug: 29548224 Change-Id: I109c91c4147814547bb75003d312d81d41a52c13 --- api/current.txt | 2 ++ api/system-current.txt | 2 ++ api/test-current.txt | 2 ++ telecomm/java/android/telecom/Conference.java | 5 +++++ .../telephony/CarrierConfigManager.java | 20 +++++++++++++++++++ 5 files changed, 31 insertions(+) diff --git a/api/current.txt b/api/current.txt index d158e102c6c3e..b98b0770b1563 100644 --- a/api/current.txt +++ b/api/current.txt @@ -37294,7 +37294,9 @@ package android.telephony { field public static final java.lang.String KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL = "hide_preferred_network_type_bool"; field public static final java.lang.String KEY_HIDE_SIM_LOCK_SETTINGS_BOOL = "hide_sim_lock_settings_bool"; field public static final java.lang.String KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL = "ignore_sim_network_locked_events_bool"; + field public static final java.lang.String KEY_IMS_CONFERENCE_SIZE_LIMIT_INT = "ims_conference_size_limit_int"; field public static final java.lang.String KEY_IMS_DTMF_TONE_DELAY_INT = "ims_dtmf_tone_delay_int"; + field public static final java.lang.String KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL = "is_ims_conference_size_enforced_bool"; field public static final java.lang.String KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL = "mdn_is_additional_voicemail_number_bool"; field public static final java.lang.String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled"; field public static final java.lang.String KEY_MMS_ALIAS_MAX_CHARS_INT = "aliasMaxChars"; diff --git a/api/system-current.txt b/api/system-current.txt index 9d487136a9ca5..996669ff5433d 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -40398,7 +40398,9 @@ package android.telephony { field public static final java.lang.String KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL = "hide_preferred_network_type_bool"; field public static final java.lang.String KEY_HIDE_SIM_LOCK_SETTINGS_BOOL = "hide_sim_lock_settings_bool"; field public static final java.lang.String KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL = "ignore_sim_network_locked_events_bool"; + field public static final java.lang.String KEY_IMS_CONFERENCE_SIZE_LIMIT_INT = "ims_conference_size_limit_int"; field public static final java.lang.String KEY_IMS_DTMF_TONE_DELAY_INT = "ims_dtmf_tone_delay_int"; + field public static final java.lang.String KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL = "is_ims_conference_size_enforced_bool"; field public static final java.lang.String KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL = "mdn_is_additional_voicemail_number_bool"; field public static final java.lang.String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled"; field public static final java.lang.String KEY_MMS_ALIAS_MAX_CHARS_INT = "aliasMaxChars"; diff --git a/api/test-current.txt b/api/test-current.txt index 9cd08d549863c..032b06d15dd8b 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -37391,7 +37391,9 @@ package android.telephony { field public static final java.lang.String KEY_HIDE_PREFERRED_NETWORK_TYPE_BOOL = "hide_preferred_network_type_bool"; field public static final java.lang.String KEY_HIDE_SIM_LOCK_SETTINGS_BOOL = "hide_sim_lock_settings_bool"; field public static final java.lang.String KEY_IGNORE_SIM_NETWORK_LOCKED_EVENTS_BOOL = "ignore_sim_network_locked_events_bool"; + field public static final java.lang.String KEY_IMS_CONFERENCE_SIZE_LIMIT_INT = "ims_conference_size_limit_int"; field public static final java.lang.String KEY_IMS_DTMF_TONE_DELAY_INT = "ims_dtmf_tone_delay_int"; + field public static final java.lang.String KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL = "is_ims_conference_size_enforced_bool"; field public static final java.lang.String KEY_MDN_IS_ADDITIONAL_VOICEMAIL_NUMBER_BOOL = "mdn_is_additional_voicemail_number_bool"; field public static final java.lang.String KEY_MMS_ALIAS_ENABLED_BOOL = "aliasEnabled"; field public static final java.lang.String KEY_MMS_ALIAS_MAX_CHARS_INT = "aliasMaxChars"; diff --git a/telecomm/java/android/telecom/Conference.java b/telecomm/java/android/telecom/Conference.java index a012082058599..177759e6751f7 100644 --- a/telecomm/java/android/telecom/Conference.java +++ b/telecomm/java/android/telecom/Conference.java @@ -28,6 +28,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Locale; +import java.util.Objects; import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArraySet; @@ -453,6 +454,10 @@ public abstract class Conference extends Conferenceable { * @param conferenceableConnections The set of connections this connection can conference with. */ public final void setConferenceableConnections(List conferenceableConnections) { + if (Objects.equals(mConferenceableConnections, conferenceableConnections)) { + return; + } + clearConferenceableList(); for (Connection c : conferenceableConnections) { // If statement checks for duplicates in input. It makes it N^2 but we're dealing with a diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index a0f52177eb765..a652a0a18206a 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -657,6 +657,24 @@ public class CarrierConfigManager { */ public static final String KEY_SUPPORT_CONFERENCE_CALL_BOOL = "support_conference_call_bool"; + /** + * Determines whether a maximum size limit for IMS conference calls is enforced on the device. + * When {@code true}, IMS conference calls will be limited to at most + * {@link #KEY_IMS_CONFERENCE_SIZE_LIMIT_INT} participants. When {@code false}, no attempt is made + * to limit the number of participants in a conference (the carrier will raise an error when an + * attempt is made to merge too many participants into a conference). + */ + public static final String KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL = + "is_ims_conference_size_enforced_bool"; + + /** + * Determines the maximum number of participants the carrier supports for a conference call. + * This number is exclusive of the current device. A conference between 3 devices, for example, + * would have a size limit of 2 participants. + * Enforced when {@link #KEY_IS_IMS_CONFERENCE_SIZE_ENFORCED_BOOL} is {@code true}. + */ + public static final String KEY_IMS_CONFERENCE_SIZE_LIMIT_INT = "ims_conference_size_limit_int"; + /** * 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 @@ -1232,6 +1250,8 @@ public class CarrierConfigManager { sDefaults.putInt(KEY_CDMA_3WAYCALL_FLASH_DELAY_INT , 0); sDefaults.putBoolean(KEY_SUPPORT_CONFERENCE_CALL_BOOL, true); 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); sDefaults.putBoolean(KEY_DISPLAY_HD_AUDIO_PROPERTY_BOOL, true); sDefaults.putBoolean(KEY_EDITABLE_ENHANCED_4G_LTE_BOOL, true); sDefaults.putBoolean(KEY_HIDE_IMS_APN_BOOL, false);