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

Commit 103627d3 authored by Allen Su's avatar Allen Su Committed by Automerger Merge Worker
Browse files

Merge "[RCS]Add new carrier configs for presence" am: f2fdcff5 am: 992b4ffd am: 2fc4cc29

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1511319

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I704895d43045983426ea3fff2363bfed8e9281b8
parents 92cbd595 2fc4cc29
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -33635,8 +33635,8 @@ package android.provider {
  }
  protected static interface ContactsContract.DataColumns {
    field public static final String CARRIER_PRESENCE = "carrier_presence";
    field public static final int CARRIER_PRESENCE_VT_CAPABLE = 1; // 0x1
    field @Deprecated public static final String CARRIER_PRESENCE = "carrier_presence";
    field @Deprecated public static final int CARRIER_PRESENCE_VT_CAPABLE = 1; // 0x1
    field public static final String DATA1 = "data1";
    field public static final String DATA10 = "data10";
    field public static final String DATA11 = "data11";
@@ -40689,7 +40689,7 @@ package android.telephony {
    field public static final String KEY_USE_ACS_FOR_RCS_BOOL = "use_acs_for_rcs_bool";
    field public static final String KEY_USE_HFA_FOR_PROVISIONING_BOOL = "use_hfa_for_provisioning_bool";
    field public static final String KEY_USE_OTASP_FOR_PROVISIONING_BOOL = "use_otasp_for_provisioning_bool";
    field public static final String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
    field @Deprecated public static final String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";
    field public static final String KEY_USE_RCS_SIP_OPTIONS_BOOL = "use_rcs_sip_options_bool";
    field public static final String KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL = "use_wfc_home_network_mode_in_roaming_network_bool";
    field public static final String KEY_VOICEMAIL_NOTIFICATION_PERSISTENT_BOOL = "voicemail_notification_persistent_bool";
@@ -40729,9 +40729,12 @@ package android.telephony {
  }
  public static final class CarrierConfigManager.Ims {
    field public static final String KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL = "ims.enable_presence_capability_exchange_bool";
    field public static final String KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL = "ims.enable_presence_group_subscribe_bool";
    field public static final String KEY_ENABLE_PRESENCE_PUBLISH_BOOL = "ims.enable_presence_publish_bool";
    field public static final String KEY_IMS_SINGLE_REGISTRATION_REQUIRED_BOOL = "ims.ims_single_registration_required_bool";
    field public static final String KEY_PREFIX = "ims.";
    field public static final String KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL = "ims.rcs_bulk_capability_exchange_bool";
    field public static final String KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT = "ims.wifi_off_deferring_time_millis_int";
  }
+10 −0
Original line number Diff line number Diff line
@@ -4313,13 +4313,23 @@ public final class ContactsContract {
         * <P>
         * Type: INTEGER (A bitmask of CARRIER_PRESENCE_* fields)
         * </P>
         *
         * @deprecated The contacts database will only show presence
         * information on devices where
         * {@link android.telephony.CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL} is true,
         * otherwise use {@link android.telephony.ims.RcsUceAdapter}.
         */
        @Deprecated
        public static final String CARRIER_PRESENCE = "carrier_presence";

        /**
         * Indicates that the entry is Video Telephony (VT) capable on the
         * current carrier. An allowed bitmask of {@link #CARRIER_PRESENCE}.
         *
         * @deprecated Same as {@link DataColumns#CARRIER_PRESENCE}.
         *
         */
        @Deprecated
        public static final int CARRIER_PRESENCE_VT_CAPABLE = 0x01;

        /**
+49 −2
Original line number Diff line number Diff line
@@ -2050,7 +2050,13 @@ public class CarrierConfigManager {
     * via {@link android.telecom.PhoneAccount#CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE}
     * and can choose to hide or show the video calling icon based on whether a contact supports
     * video.
     *
     * @deprecated No longer used in framework code, however it may still be used by applications
     * that have not updated their code. This config should still be set to {@code true} if
     * {@link Ims#KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL} is set to {@code true} and
     * {@link Ims#KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL} is set to {@code true}.
     */
    @Deprecated
    public static final String KEY_USE_RCS_PRESENCE_BOOL = "use_rcs_presence_bool";

    /**
@@ -3866,13 +3872,51 @@ public class CarrierConfigManager {
         * <p>
         * If this key's value is set to false, the procedure for RCS contact capability exchange
         * via SIP SUBSCRIBE/NOTIFY will also be disabled internally, and
         * {@link #KEY_USE_RCS_PRESENCE_BOOL} must also be set to false to ensure apps do not
         * improperly think that capability exchange via SIP PUBLISH is enabled.
         * {@link Ims#KEY_ENABLE_PRESENCE_PUBLISH_BOOL} must also be set to false to ensure
         * apps do not improperly think that capability exchange via SIP PUBLISH is enabled.
         * <p> The default value for this key is {@code false}.
         */
        public static final String KEY_ENABLE_PRESENCE_PUBLISH_BOOL =
                KEY_PREFIX + "enable_presence_publish_bool";

        /**
         * Flag indicating whether or not this carrier supports the exchange of phone numbers with
         * the carrier's RCS presence server in order to retrieve the RCS capabilities of requested
         * contacts used in the RCS User Capability Exchange (UCE) procedure. See RCC.71, section 3
         * for more information.
         * <p>
         * When presence is supported, the device uses the SIP SUBSCRIBE/NOTIFY procedure internally
         * to retrieve the requested RCS capabilities. See
         * {@link android.telephony.ims.RcsUceAdapter} for more information on how RCS capabilities
         * can be retrieved from the carrier's network.
         */
        public static final String KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL =
                KEY_PREFIX + "enable_presence_capability_exchange_bool";


        /**
         * Flag indicating whether or not the carrier expects the RCS UCE service to periodically
         * refresh the RCS capabilities cache of the user's contacts as well as request the
         * capabilities of call contacts when the SIM card is first inserted or when a new contact
         * is added, removed, or modified. This corresponds to the RCC.07 A.19
         * "DISABLE INITIAL ADDRESS BOOK SCAN" parameter.
         * <p>
         * 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.
         */
        public static final String KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL =
                KEY_PREFIX + "rcs_bulk_capability_exchange_bool";

        /**
         * Flag indicating whether or not the carrier supports capability exchange with a list of
         * contacts. When {@code true}, the device will batch together multiple requests and
         * construct a RLMI document in the SIP SUBSCRIBE request (see RFC 4662). If {@code false},
         * the request will be split up into one SIP SUBSCRIBE request per contact.
         */
        public static final String KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL =
                KEY_PREFIX + "enable_presence_group_subscribe_bool";

        private Ims() {}

        private static PersistableBundle getDefaults() {
@@ -3880,6 +3924,9 @@ public class CarrierConfigManager {
            defaults.putInt(KEY_WIFI_OFF_DEFERRING_TIME_MILLIS_INT, 4000);
            defaults.putBoolean(KEY_IMS_SINGLE_REGISTRATION_REQUIRED_BOOL, false);
            defaults.putBoolean(KEY_ENABLE_PRESENCE_PUBLISH_BOOL, false);
            defaults.putBoolean(KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL, false);
            defaults.putBoolean(KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL, false);
            defaults.putBoolean(KEY_ENABLE_PRESENCE_GROUP_SUBSCRIBE_BOOL, true);
            return defaults;
        }
    }
+5 −4
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import android.os.ServiceSpecificException;
import android.provider.Settings;
import android.telephony.AccessNetworkConstants;
import android.telephony.BinderCacheManager;
import android.telephony.CarrierConfigManager;
import android.telephony.TelephonyFrameworkInitializer;
import android.telephony.ims.aidl.IImsCapabilityCallback;
import android.telephony.ims.aidl.IImsRcsController;
@@ -62,9 +61,10 @@ public class ImsRcsManager {
     * been enabled by the user can be queried using {@link RcsUceAdapter#isUceSettingEnabled()}.
     * <p>
     * This intent will always be handled by the system, however the application should only send
     * this Intent if the carrier supports RCS contact discovery, which can be queried using the key
     * {@link CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL}. Otherwise, the RCS contact discovery
     * opt-in dialog will not be shown.
     * this Intent if the carrier supports bulk RCS contact exchange, which will be true if either
     * key {@link android.telephony.CarrierConfigManager.Ims#KEY_RCS_BULK_CAPABILITY_EXCHANGE_BOOL}
     * or {@link android.telephony.CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL} is set to true.
     * Otherwise, the RCS contact discovery opt-in dialog will not be shown.
     * <p>
     * Input: A mandatory {@link Settings#EXTRA_SUB_ID} extra containing the subscription that the
     * setting will be be shown for.
@@ -396,6 +396,7 @@ public class ImsRcsManager {
     * rather the subscription is capable of this service over IMS.
     * @see #isAvailable(int)
     * @see android.telephony.CarrierConfigManager#KEY_USE_RCS_PRESENCE_BOOL
     * @see android.telephony.CarrierConfigManager.Ims#KEY_ENABLE_PRESENCE_CAPABILITY_EXCHANGE_BOOL
     * @throws ImsException if the IMS service is not available when calling this method.
     * See {@link ImsException#getCode()} for more information on the error codes.
     * @hide