From cf451204eb0974aea1d894fadebfddb905a8c6b9 Mon Sep 17 00:00:00 2001 From: "James.cf Lin" Date: Thu, 29 Apr 2021 15:41:17 +0800 Subject: [PATCH] Add carrier config for the SIP 486 request forbidden and add API for SHELL command to remove the UCE requests cannot be sent the network status. Bug: 186131340 Test: atest ImsServiceTest RcsUceAdapterTest Change-Id: Id3a97fc975764754d6b610478c17a501f65aa229 --- .../telephony/CarrierConfigManager.java | 22 +++++++++++++++++++ .../internal/telephony/ITelephony.aidl | 6 +++++ 2 files changed, 28 insertions(+) diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index dd474f02a2ed1..f6ba7becc922b 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -4106,6 +4106,26 @@ public class CarrierConfigManager { public static final String KEY_RCS_FEATURE_TAG_ALLOWED_STRING_ARRAY = KEY_PREFIX + "rcs_feature_tag_allowed_string_array"; + /** + * Flag indicating whether or not carrier forbids device send the RCS request when the + * device receive the network response with the SIP code 489 BAD EVENT. + *

+ * The default value for this key is {@code false}. + * @hide + */ + public static final String KEY_RCS_REQUEST_FORBIDDEN_BY_SIP_489_BOOL = + KEY_PREFIX + "rcs_request_forbidden_by_sip_489_bool"; + + /** + * Indicates the interval that SUBSCRIBE requests from applications will be retried at when + * the carrier network has responded to a previous request with a forbidden error. + *

+ * The default value for this key is 20 minutes. + * @hide + */ + public static final String KEY_RCS_REQUEST_RETRY_INTERVAL_MILLIS_LONG = + KEY_PREFIX + "rcs_request_retry_interval_millis_long"; + private Ims() {} private static PersistableBundle getDefaults() { @@ -4119,6 +4139,8 @@ public class CarrierConfigManager { defaults.putBoolean(KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL, false); defaults.putBoolean(KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL, true); defaults.putInt(KEY_NON_RCS_CAPABILITIES_CACHE_EXPIRATION_SEC_INT, 30 * 24 * 60 * 60); + defaults.putBoolean(KEY_RCS_REQUEST_FORBIDDEN_BY_SIP_489_BOOL, false); + defaults.putLong(KEY_RCS_REQUEST_RETRY_INTERVAL_MILLIS_LONG, 20 * 60 * 1000); defaults.putStringArray(KEY_RCS_FEATURE_TAG_ALLOWED_STRING_ARRAY, new String[]{ "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.msg\"", "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.largemsg\"", diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index 97078c3dd76e5..3c55b7c8dbd60 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -2397,6 +2397,12 @@ interface ITelephony { */ String getLastUcePidfXmlShell(int subId); + /** + * Remove UCE requests cannot be sent to the network status. + * Note: This is designed for a SHELL command only. + */ + boolean removeUceRequestDisallowedStatus(int subId); + /** * Set a SignalStrengthUpdateRequest to receive notification when Signal Strength breach the * specified thresholds.