diff options
Diffstat (limited to 'telephony/java/android')
14 files changed, 177 insertions, 85 deletions
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index cff4c58c3641..b241f71070c2 100644 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -38,6 +38,7 @@ import android.telephony.gba.UaSecurityProtocolIdentifier; import android.telephony.ims.ImsReasonInfo; import android.telephony.ims.ImsRegistrationAttributes; import android.telephony.ims.ImsSsData; +import android.telephony.ims.RcsUceAdapter; import android.telephony.ims.feature.MmTelFeature; import android.telephony.ims.feature.RcsFeature; @@ -3724,6 +3725,13 @@ public class CarrierConfigManager { "emergency_number_prefix_string_array"; /** + * Indicates whether carrier treats "*67" or "*82" as a temporary mode CLIR. + * @hide + */ + public static final String KEY_CARRIER_SUPPORTS_CALLER_ID_VERTICAL_SERVICE_CODES_BOOL = + "carrier_supports_caller_id_vertical_service_codes_bool"; + + /** * Smart forwarding config. Smart forwarding is a feature to configure call forwarding to a * different SIM in the device when one SIM is not reachable. The config here specifies a smart * forwarding component that will launch UI for changing the configuration. An empty string @@ -4302,6 +4310,9 @@ public class CarrierConfigManager { * If this flag is disabled, the capabilities cache will not be refreshed internally at all * and will only be updated if the cached capabilities are stale when an application * requests them. + * + * @see RcsUceAdapter#isUceSettingEnabled() more information about this feature and how + * it is enabled by the user. */ public static final String KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL = KEY_PREFIX + "rcs_bulk_capability_exchange_bool"; @@ -4378,7 +4389,7 @@ public class CarrierConfigManager { "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.deferred\"", "+g.gsma.rcs.cpm.pager-large", "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.session\"", - "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.session\"", + "+g.3gpp.icsi-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.oma.cpm.filetransfer\"", "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.fthttp\"", "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-application.ims.iari.rcs.ftsms\"", "+g.3gpp.iari-ref=\"urn%3Aurn-7%3A3gpp-service.ims.icsi.gsma.callcomposer\"", @@ -5579,6 +5590,7 @@ public class CarrierConfigManager { 1 /* Roaming Indicator Off */ }); sDefaults.putStringArray(KEY_EMERGENCY_NUMBER_PREFIX_STRING_ARRAY, new String[0]); + sDefaults.putBoolean(KEY_CARRIER_SUPPORTS_CALLER_ID_VERTICAL_SERVICE_CODES_BOOL, false); sDefaults.putBoolean(KEY_USE_USIM_BOOL, false); sDefaults.putBoolean(KEY_SHOW_WFC_LOCATION_PRIVACY_POLICY_BOOL, false); sDefaults.putBoolean(KEY_AUTO_CANCEL_CS_REJECT_NOTIFICATION, true); @@ -5636,7 +5648,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_STORE_SIM_PIN_FOR_UNATTENDED_REBOOT_BOOL, true); sDefaults.putBoolean(KEY_HIDE_ENABLE_2G, false); sDefaults.putStringArray(KEY_ALLOWED_INITIAL_ATTACH_APN_TYPES_STRING_ARRAY, - new String[]{"ia", "default", "ims", "mms", "dun", "emergency"}); + new String[]{"ia", "default", "mms", "dun"}); sDefaults.putBoolean(KEY_CARRIER_PROVISIONS_WIFI_MERGED_NETWORKS_BOOL, false); sDefaults.putBoolean(KEY_USE_IP_FOR_CALLING_INDICATOR_BOOL, false); sDefaults.putBoolean(KEY_DISPLAY_CALL_STRENGTH_INDICATOR_BOOL, true); diff --git a/telephony/java/android/telephony/CellBroadcastService.java b/telephony/java/android/telephony/CellBroadcastService.java index ac775b391e94..14de2f285756 100644 --- a/telephony/java/android/telephony/CellBroadcastService.java +++ b/telephony/java/android/telephony/CellBroadcastService.java @@ -28,6 +28,11 @@ import android.os.IBinder; import android.os.RemoteCallback; import android.telephony.cdma.CdmaSmsCbProgramData; +import com.android.internal.util.FastPrintWriter; + +import java.io.FileDescriptor; +import java.io.FileOutputStream; +import java.io.PrintWriter; import java.util.List; import java.util.function.Consumer; @@ -186,5 +191,16 @@ public abstract class CellBroadcastService extends Service { public @NonNull CharSequence getCellBroadcastAreaInfo(int slotIndex) { return CellBroadcastService.this.getCellBroadcastAreaInfo(slotIndex); } + + @Override + protected void dump(FileDescriptor fd, PrintWriter fout, String[] args) { + CellBroadcastService.this.dump(fd, fout, args); + } + + @Override + public void dump(FileDescriptor fd, String[] args) { + PrintWriter pw = new FastPrintWriter(new FileOutputStream(fd)); + CellBroadcastService.this.dump(fd, pw, args); + } } } diff --git a/telephony/java/android/telephony/SubscriptionInfo.java b/telephony/java/android/telephony/SubscriptionInfo.java index 21bb43cb6f32..2d50e08ab922 100644 --- a/telephony/java/android/telephony/SubscriptionInfo.java +++ b/telephony/java/android/telephony/SubscriptionInfo.java @@ -311,8 +311,8 @@ public class SubscriptionInfo implements Parcelable { /** * Returns the ICC ID. * - * Starting with API level 30, returns the ICC ID if the calling app has been granted the - * READ_PRIVILEGED_PHONE_STATE permission, has carrier privileges (see + * Starting with API level 29 Security Patch 2021-04-05, returns the ICC ID if the calling app + * has been granted the READ_PRIVILEGED_PHONE_STATE permission, has carrier privileges (see * {@link TelephonyManager#hasCarrierPrivileges}), or is a device owner or profile owner that * has been granted the READ_PHONE_STATE permission. The profile owner is an app that owns a * managed profile on the device; for more details see <a @@ -699,8 +699,8 @@ public class SubscriptionInfo implements Parcelable { /** * Returns the card string of the SIM card which contains the subscription. * - * Starting with API level 30, returns the card string if the calling app has been granted the - * READ_PRIVILEGED_PHONE_STATE permission, has carrier privileges (see + * Starting with API level 29 Security Patch 2021-04-05, returns the card string if the calling + * app has been granted the READ_PRIVILEGED_PHONE_STATE permission, has carrier privileges (see * {@link TelephonyManager#hasCarrierPrivileges}), or is a device owner or profile owner that * has been granted the READ_PHONE_STATE permission. The profile owner is an app that owns a * managed profile on the device; for more details see <a diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index c2d827773b75..bf36a25e342b 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -8577,7 +8577,7 @@ public class TelephonyManager { * app has carrier privileges (see {@link #hasCarrierPrivileges}). * <p> * If {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported} - * ({@link TelephonyManager#CAPABILITY_ALLOWED_NETWORK_TYPES_USED}) returns true, then + * ({@link TelephonyManager#CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK}) returns true, then * setAllowedNetworkTypesBitmap is used on the radio interface. Otherwise, * setPreferredNetworkTypesBitmap is used instead. * @@ -8615,7 +8615,7 @@ public class TelephonyManager { * app has carrier privileges (see {@link #hasCarrierPrivileges}). * <p> * If {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported} - * ({@link TelephonyManager#CAPABILITY_ALLOWED_NETWORK_TYPES_USED}) returns true, then + * ({@link TelephonyManager#CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK}) returns true, then * setAllowedNetworkTypesBitmap is used on the radio interface. Otherwise, * setPreferredNetworkTypesBitmap is used instead. * @@ -8646,7 +8646,7 @@ public class TelephonyManager { * be set through {@link #setPreferredNetworkTypeBitmask}. * <p> * If {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported} - * ({@link TelephonyManager#CAPABILITY_ALLOWED_NETWORK_TYPES_USED}) returns true, then + * ({@link TelephonyManager#CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK}) returns true, then * setAllowedNetworkTypesBitmap is used on the radio interface. Otherwise, * setPreferredNetworkTypesBitmap is used instead. * @@ -8659,7 +8659,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature( enforcement = "android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported", - value = TelephonyManager.CAPABILITY_ALLOWED_NETWORK_TYPES_USED) + value = TelephonyManager.CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK) @SystemApi public boolean setAllowedNetworkTypes(@NetworkTypeBitMask long allowedNetworkTypes) { try { @@ -8744,7 +8744,7 @@ public class TelephonyManager { * {@link TelephonyManager#setAllowedNetworkTypes}. * <p> * If {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported} - * ({@link TelephonyManager#CAPABILITY_ALLOWED_NETWORK_TYPES_USED}) returns true, then + * ({@link TelephonyManager#CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK}) returns true, then * setAllowedNetworkTypesBitmap is used on the radio interface. Otherwise, * setPreferredNetworkTypesBitmap is used instead. * @@ -8758,7 +8758,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) @RequiresFeature( enforcement = "android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported", - value = TelephonyManager.CAPABILITY_ALLOWED_NETWORK_TYPES_USED) + value = TelephonyManager.CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK) public void setAllowedNetworkTypesForReason(@AllowedNetworkTypesReason int reason, @NetworkTypeBitMask long allowedNetworkTypes) { if (!isValidAllowedNetworkTypesReason(reason)) { @@ -8794,7 +8794,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresFeature( enforcement = "android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported", - value = TelephonyManager.CAPABILITY_ALLOWED_NETWORK_TYPES_USED) + value = TelephonyManager.CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK) @SystemApi public @NetworkTypeBitMask long getAllowedNetworkTypesForReason( @AllowedNetworkTypesReason int reason) { @@ -14990,8 +14990,8 @@ public class TelephonyManager { * @hide */ @SystemApi - public static final String CAPABILITY_ALLOWED_NETWORK_TYPES_USED = - "CAPABILITY_ALLOWED_NETWORK_TYPES_USED"; + public static final String CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK = + "CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK"; /** * Indicates whether {@link #setNrDualConnectivityState()} and @@ -15031,11 +15031,20 @@ public class TelephonyManager { "CAPABILITY_PHYSICAL_CHANNEL_CONFIG_1_6_SUPPORTED"; /** + * Indicates whether modem supports handling parsed SIM phonebook records through the RIL, + * both batched reads and individual writes. + * + * @hide + */ + public static final String CAPABILITY_SIM_PHONEBOOK_IN_MODEM = + "CAPABILITY_SIM_PHONEBOOK_IN_MODEM"; + + /** * A list of the radio interface capability values with public valid constants. * * Here is a related list for the systemapi-only valid constants: * CAPABILITY_SECONDARY_LINK_BANDWIDTH_VISIBLE - * CAPABILITY_ALLOWED_NETWORK_TYPES_USED + * CAPABILITY_USES_ALLOWED_NETWORK_TYPES_BITMASK * CAPABILITY_NR_DUAL_CONNECTIVITY_CONFIGURATION_AVAILABLE * CAPABILITY_THERMAL_MITIGATION_DATA_THROTTLING * @@ -15045,6 +15054,7 @@ public class TelephonyManager { @Retention(RetentionPolicy.SOURCE) @StringDef(prefix = "CAPABILITY_", value = { CAPABILITY_SLICING_CONFIG_SUPPORTED, + CAPABILITY_SIM_PHONEBOOK_IN_MODEM, }) public @interface RadioInterfaceCapability {} diff --git a/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java b/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java index 9bc7a5c6cf96..fe4453081362 100644 --- a/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java +++ b/telephony/java/android/telephony/data/EpsBearerQosSessionAttributes.java @@ -206,6 +206,26 @@ public final class EpsBearerQosSessionAttributes implements Parcelable, QosSessi } } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EpsBearerQosSessionAttributes epsBearerAttr = (EpsBearerQosSessionAttributes) o; + return mQci == epsBearerAttr.mQci + && mMaxUplinkBitRate == epsBearerAttr.mMaxUplinkBitRate + && mMaxDownlinkBitRate == epsBearerAttr.mMaxDownlinkBitRate + && mGuaranteedUplinkBitRate == epsBearerAttr.mGuaranteedUplinkBitRate + && mGuaranteedDownlinkBitRate == epsBearerAttr.mGuaranteedDownlinkBitRate + && mRemoteAddresses.size() == epsBearerAttr.mRemoteAddresses.size() + && mRemoteAddresses.containsAll(epsBearerAttr.mRemoteAddresses); + } + + @Override + public int hashCode() { + return Objects.hash(mQci, mMaxUplinkBitRate, mMaxDownlinkBitRate, + mGuaranteedUplinkBitRate, mGuaranteedDownlinkBitRate, mRemoteAddresses); + } + @NonNull public static final Creator<EpsBearerQosSessionAttributes> CREATOR = new Creator<EpsBearerQosSessionAttributes>() { diff --git a/telephony/java/android/telephony/data/NrQosSessionAttributes.java b/telephony/java/android/telephony/data/NrQosSessionAttributes.java index 4c37687910a1..c3a0eedf3d7d 100644 --- a/telephony/java/android/telephony/data/NrQosSessionAttributes.java +++ b/telephony/java/android/telephony/data/NrQosSessionAttributes.java @@ -241,6 +241,30 @@ public final class NrQosSessionAttributes implements Parcelable, QosSessionAttri } } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NrQosSessionAttributes nrQosAttr = (NrQosSessionAttributes) o; + return m5Qi == nrQosAttr.m5Qi + && mQfi == nrQosAttr.mQfi + && mMaxUplinkBitRate == nrQosAttr.mMaxUplinkBitRate + && mMaxDownlinkBitRate == nrQosAttr.mMaxDownlinkBitRate + && mGuaranteedUplinkBitRate == nrQosAttr.mGuaranteedUplinkBitRate + && mGuaranteedDownlinkBitRate == nrQosAttr.mGuaranteedDownlinkBitRate + && mAveragingWindow == nrQosAttr.mAveragingWindow + && mRemoteAddresses.size() == nrQosAttr.mRemoteAddresses.size() + && mRemoteAddresses.containsAll(nrQosAttr.mRemoteAddresses); + } + + @Override + public int hashCode() { + return Objects.hash(m5Qi, mQfi, mMaxUplinkBitRate, + mMaxDownlinkBitRate, mGuaranteedUplinkBitRate, + mGuaranteedDownlinkBitRate, mAveragingWindow, mRemoteAddresses); + } + + @NonNull public static final Creator<NrQosSessionAttributes> CREATOR = new Creator<NrQosSessionAttributes>() { diff --git a/telephony/java/android/telephony/ims/DelegateStateCallback.java b/telephony/java/android/telephony/ims/DelegateStateCallback.java index 2b4fb7d5cbf3..734b52018857 100644 --- a/telephony/java/android/telephony/ims/DelegateStateCallback.java +++ b/telephony/java/android/telephony/ims/DelegateStateCallback.java @@ -79,7 +79,7 @@ public interface DelegateStateCallback { * messages routing should be delayed until the {@link SipDelegate} sends the IMS configuration * change event to reduce conditions where the remote application is using a stale IMS * configuration. - * @deprecated This is being removed from API surface, Use + * @removed This is being removed from API surface, Use * {@link #onConfigurationChanged(SipDelegateConfiguration)} instead. */ @Deprecated diff --git a/telephony/java/android/telephony/ims/ImsRcsManager.java b/telephony/java/android/telephony/ims/ImsRcsManager.java index 814ce18c51e3..370002634278 100644 --- a/telephony/java/android/telephony/ims/ImsRcsManager.java +++ b/telephony/java/android/telephony/ims/ImsRcsManager.java @@ -56,7 +56,9 @@ public class ImsRcsManager { /** * Activity Action: Show the opt-in dialog for enabling or disabling RCS contact discovery - * using User Capability Exchange (UCE). + * using User Capability Exchange (UCE), which enables a service that periodically shares the + * phone numbers of all of the contacts in the user's address book with the carrier to refresh + * the RCS capabilities associated with those contacts as the local cache becomes stale. * <p> * An application that depends on RCS contact discovery being enabled must send this intent * using {@link Context#startActivity(Intent)} to ask the user to opt-in for contacts upload for diff --git a/telephony/java/android/telephony/ims/RcsContactUceCapability.java b/telephony/java/android/telephony/ims/RcsContactUceCapability.java index acfa13380948..530003d6350a 100644 --- a/telephony/java/android/telephony/ims/RcsContactUceCapability.java +++ b/telephony/java/android/telephony/ims/RcsContactUceCapability.java @@ -128,6 +128,18 @@ public final class RcsContactUceCapability implements Parcelable { } /** + * Create the Builder, which can be used to set UCE capabilities as well as custom + * capability extensions. + * @param contact The contact URI that the capabilities are attached to. + * @param sourceType The type where the capabilities of this contact were retrieved from. + * @hide + */ + public OptionsBuilder(@NonNull Uri contact, @SourceType int sourceType) { + mCapabilities = new RcsContactUceCapability(contact, CAPABILITY_MECHANISM_OPTIONS, + sourceType); + } + + /** * Set the result of the capabilities request. * @param requestResult the request result * @return this OptionBuilder diff --git a/telephony/java/android/telephony/ims/RcsUceAdapter.java b/telephony/java/android/telephony/ims/RcsUceAdapter.java index dd9102699529..7a1c09275a6d 100644 --- a/telephony/java/android/telephony/ims/RcsUceAdapter.java +++ b/telephony/java/android/telephony/ims/RcsUceAdapter.java @@ -28,10 +28,13 @@ import android.os.Binder; import android.os.IBinder; import android.os.RemoteException; import android.os.ServiceSpecificException; +import android.telephony.CarrierConfigManager; +import android.telephony.SubscriptionManager; import android.telephony.TelephonyFrameworkInitializer; import android.telephony.ims.aidl.IImsRcsController; import android.telephony.ims.aidl.IRcsUceControllerCallback; import android.telephony.ims.aidl.IRcsUcePublishStateCallback; +import android.telephony.ims.feature.RcsFeature; import android.util.Log; import java.lang.annotation.Retention; @@ -417,7 +420,7 @@ public class RcsUceAdapter { * <p> * After {@link CapabilitiesCallback#onComplete} or {@link CapabilitiesCallback#onError} has * been called, the reference to this callback will be discarded on the service side. - * @see #requestCapabilities(Executor, List, CapabilitiesCallback) + * @see #requestCapabilities(Collection, Executor, CapabilitiesCallback) * @hide */ @SystemApi @@ -464,10 +467,16 @@ public class RcsUceAdapter { } /** - * Request the User Capability Exchange capabilities for one or more contacts. + * Request the RCS capabilities for one or more contacts using RCS User Capability Exchange. * <p> - * This will return the cached capabilities of the contact and will not perform a capability - * poll on the network unless there are contacts being queried with stale information. + * This API will first check a local cache for the requested numbers and return the cached + * RCS capabilities of each number if the cache exists and is not stale. If the cache for a + * number is stale or there is no cached information about the requested number, the device will + * then perform a query to the carrier's network to request the RCS capabilities of the + * requested numbers. + * <p> + * Depending on the number of requests being sent, this API may throttled internally as the + * operations are queued to be executed by the carrier's network. * <p> * Be sure to check the availability of this feature using * {@link ImsRcsManager#isAvailable(int, int)} and ensuring @@ -552,13 +561,15 @@ public class RcsUceAdapter { } /** - * Ignore the device cache and perform a capability discovery for one contact, also called - * "availability fetch." + * Request the RCS capabilities for a phone number using User Capability Exchange. * <p> - * This will always perform a query to the network as long as requests are over the carrier - * availability fetch throttling threshold. If too many network requests are sent too quickly, - * #ERROR_TOO_MANY_REQUESTS will be returned. - * + * Unlike {@link #requestCapabilities(Collection, Executor, CapabilitiesCallback)}, which caches + * the result received from the network for a certain amount of time and uses that cached result + * for subsequent requests for RCS capabilities of the same phone number, this API will always + * request the RCS capabilities of a contact from the carrier's network. + * <p> + * Depending on the number of requests, this API may throttled internally as the operations are + * queued to be executed by the carrier's network. * <p> * Be sure to check the availability of this feature using * {@link ImsRcsManager#isAvailable(int, int)} and ensuring @@ -680,7 +691,8 @@ public class RcsUceAdapter { * state updates for the subscription specified in {@link ImsManager@getRcsManager(subid)}. * <p> * Use {@link SubscriptionManager.OnSubscriptionsChangedListener} to listen to subscription - * changed events and call {@link #unregisterPublishStateCallback} to clean up. + * changed events and call + * {@link #removeOnPublishStateChangedListener(OnPublishStateChangedListener)} to clean up. * <p> * The registered {@link OnPublishStateChangedListener} will also receive a callback when it is * registered with the current publish state. @@ -770,13 +782,23 @@ public class RcsUceAdapter { } /** - * The user’s setting for whether or not User Capability Exchange (UCE) is enabled for the - * associated subscription. + * The setting for whether or not the user has opted in to the automatic refresh of the RCS + * capabilities associated with the contacts in the user's contact address book. By default, + * this setting is disabled and must be enabled after the user has seen the opt-in dialog shown + * by {@link ImsRcsManager#ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN}. + * <p> + * If this feature is enabled, the device will periodically share the phone numbers of all of + * the contacts in the user's address book with the carrier to refresh the RCS capabilities + * cache associated with those contacts as the local cache becomes stale. + * <p> + * This setting will only enable this feature if + * {@link CarrierConfigManager.Ims#KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL} is also enabled. * <p> * Note: This setting does not affect whether or not the device publishes its service * capabilities if the subscription supports presence publication. * - * @return true if the user’s setting for UCE is enabled, false otherwise. + * @return true if the user has opted in for automatic refresh of the RCS capabilities of their + * contacts, false otherwise. * @throws ImsException if the subscription associated with this instance of * {@link RcsUceAdapter} is valid, but the ImsService associated with the subscription is not * available. This can happen if the ImsService has crashed, for example, or if the subscription @@ -802,18 +824,33 @@ public class RcsUceAdapter { } /** - * Change the user’s setting for whether or not UCE is enabled for the associated subscription. + * Change the user’s setting for whether or not the user has opted in to the automatic + * refresh of the RCS capabilities associated with the contacts in the user's contact address + * book. By default, this setting is disabled and must be enabled using this method after the + * user has seen the opt-in dialog shown by + * {@link ImsRcsManager#ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN}. + * <p> + * If an application wishes to request that the user enable this feature, they must launch an + * Activity using the Intent {@link ImsRcsManager#ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN}, + * which will ask the user if they wish to enable this feature. This setting must only be + * enabled after the user has opted-in to this feature. + * <p> + * This must not affect the + * {@link #requestCapabilities(Collection, Executor, CapabilitiesCallback)} or + * {@link #requestAvailability(Uri, Executor, CapabilitiesCallback)} API, + * as those APIs are still required for per-contact RCS capability queries of phone numbers + * required for operations such as placing a Video Telephony call or starting an RCS chat + * session. * <p> - * If an application Requires UCE, they will launch an Activity using the Intent - * {@link ImsRcsManager#ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN}, which will ask the user if - * they wish to enable this feature. This setting should only be enabled after the user has - * opted-in to capability exchange. + * This setting will only enable this feature if + * {@link CarrierConfigManager.Ims#KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL} is also enabled. * <p> * Note: This setting does not affect whether or not the device publishes its service * capabilities if the subscription supports presence publication. * - * @param isEnabled the user's setting for whether or not they wish for User - * Capability Exchange to be enabled. + * @param isEnabled true if the user has opted in for automatic refresh of the RCS capabilities + * of their contacts, or false if they have chosen to opt-out. By default this + * setting is disabled. * @throws ImsException if the subscription associated with this instance of * {@link RcsUceAdapter} is valid, but the ImsService associated with the subscription is not * available. This can happen if the ImsService has crashed, for example, or if the subscription diff --git a/telephony/java/android/telephony/ims/SipDelegateConnection.java b/telephony/java/android/telephony/ims/SipDelegateConnection.java index 4dbb08d14ccd..498b408fe139 100644 --- a/telephony/java/android/telephony/ims/SipDelegateConnection.java +++ b/telephony/java/android/telephony/ims/SipDelegateConnection.java @@ -62,26 +62,6 @@ public interface SipDelegateConnection { void notifyMessageReceived(@NonNull String viaTransactionId); /** - * The SIP Dialog associated with the provided Call-ID is being closed and routing resources - * associated with the SIP dialog are free to be released. - * <p> - * Calling this method is also mandatory for situations where the framework IMS stack is waiting - * for pending SIP dialogs to be closed before it can perform a handover or apply a provisioning - * change. See {@link DelegateRegistrationState} for more information about - * the scenarios where this can occur. - * <p> - * This method will need to be called for each SIP dialog managed by this application when it is - * closed. - * @param callId The call-ID header value associated with the ongoing SIP Dialog that is - * closing. - * @deprecated closeDialog does not capture INVITE forking. Use {@link #cleanupSession} instead. - */ - @Deprecated - default void closeDialog(@NonNull String callId) { - cleanupSession(callId); - } - - /** * The SIP session associated with the provided Call-ID is being closed and routing resources * associated with the session are free to be released. Each SIP session may contain multiple * dialogs due to SIP INVITE forking, so this method must be called after all SIP dialogs @@ -97,7 +77,7 @@ public interface SipDelegateConnection { * @param callId The call-ID header value associated with the ongoing SIP Dialog that is * closing. */ - default void cleanupSession(@NonNull String callId) { } + void cleanupSession(@NonNull String callId); /** * Notify the SIP delegate that the SIP message has been received from diff --git a/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java b/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java index 08513c23291a..fe14dd18d1ab 100644 --- a/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java +++ b/telephony/java/android/telephony/ims/SipDelegateImsConfiguration.java @@ -34,7 +34,7 @@ import java.net.InetSocketAddress; /** * @hide - * @deprecated Use {@link SipDelegateConfiguration} instead. + * @removed Use {@link SipDelegateConfiguration} instead. */ @Deprecated @SystemApi diff --git a/telephony/java/android/telephony/ims/stub/DelegateConnectionStateCallback.java b/telephony/java/android/telephony/ims/stub/DelegateConnectionStateCallback.java index c078637e3791..42c53f2a0caf 100644 --- a/telephony/java/android/telephony/ims/stub/DelegateConnectionStateCallback.java +++ b/telephony/java/android/telephony/ims/stub/DelegateConnectionStateCallback.java @@ -136,7 +136,7 @@ public interface DelegateConnectionStateCallback { * not compleed yet. * * @param registeredSipConfig The configuration of the IMS stack registered on the IMS network. - * @deprecated Will not be in final API, use + * @removed Will not be in final API, use * {@link #onConfigurationChanged(SipDelegateConfiguration)} instead}. */ @Deprecated @@ -161,7 +161,7 @@ public interface DelegateConnectionStateCallback { * * @param registeredSipConfig The configuration of the IMS stack registered on the IMS network. */ - default void onConfigurationChanged(@NonNull SipDelegateConfiguration registeredSipConfig) {} + void onConfigurationChanged(@NonNull SipDelegateConfiguration registeredSipConfig); /** * The previously created {@link SipDelegateConnection} instance delivered via diff --git a/telephony/java/android/telephony/ims/stub/SipDelegate.java b/telephony/java/android/telephony/ims/stub/SipDelegate.java index 997d00bc91c7..7dbefb4474a6 100644 --- a/telephony/java/android/telephony/ims/stub/SipDelegate.java +++ b/telephony/java/android/telephony/ims/stub/SipDelegate.java @@ -64,25 +64,6 @@ public interface SipDelegate { void sendMessage(@NonNull SipMessage message, long configVersion); /** - * The framework is requesting that routing resources associated with the SIP dialog using the - * provided Call-ID to be cleaned up. - * <p> - * Typically, a SIP Dialog close event will be signalled by that dialog receiving a BYE or - * 200 OK message, however, the IMS application will still call - * {@link SipDelegateConnection#closeDialog(String)} to signal to the framework that resources - * can be released. In some cases, the framework will request that the ImsService close the - * dialog due to the open dialog holding up an event such as applying a provisioning change or - * handing over to another transport type. See {@link DelegateRegistrationState}. - * - * @param callId The call-ID header value associated with the ongoing SIP Dialog that the - * framework is requesting be closed. - * @deprecated This method does not take into account INVITE forking. Use - * {@link #cleanupSession(String)} instead. - */ - @Deprecated - default void closeDialog(@NonNull String callId) { } - - /** * The remote IMS application has closed a SIP session and the routing resources associated * with the SIP session using the provided Call-ID may now be cleaned up. * <p> @@ -97,9 +78,7 @@ public interface SipDelegate { * @param callId The call-ID header value associated with the ongoing SIP Session that the * framework is requesting be cleaned up. */ - default void cleanupSession(@NonNull String callId) { - closeDialog(callId); - } + void cleanupSession(@NonNull String callId); /** * The remote application has received the SIP message and is processing it. |