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

Commit c24bfba0 authored by Hunsuk Choi's avatar Hunsuk Choi Committed by Android (Google) Code Review
Browse files

Merge changes from topic "cherrypicker-L75200000955155814:N33400001274392636"

* changes:
  Add configuration items for the terminal-based call waiting service
  Add setTerminalBasedCallWaitingStatus to MmTelFeature
parents 02fdc5a5 8b2ded49
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -41697,8 +41697,15 @@ package android.telephony {
  }
  public static final class CarrierConfigManager.ImsSs {
    field public static final int CALL_WAITING_SYNC_FIRST_CHANGE = 3; // 0x3
    field public static final int CALL_WAITING_SYNC_FIRST_POWER_UP = 2; // 0x2
    field public static final int CALL_WAITING_SYNC_IMS_ONLY = 4; // 0x4
    field public static final int CALL_WAITING_SYNC_NONE = 0; // 0x0
    field public static final int CALL_WAITING_SYNC_USER_CHANGE = 1; // 0x1
    field public static final String KEY_NETWORK_INITIATED_USSD_OVER_IMS_SUPPORTED_BOOL = "imsss.network_initiated_ussd_over_ims_supported_bool";
    field public static final String KEY_PREFIX = "imsss.";
    field public static final String KEY_TERMINAL_BASED_CALL_WAITING_DEFAULT_ENABLED_BOOL = "imsss.terminal_based_call_waiting_default_enabled_bool";
    field public static final String KEY_TERMINAL_BASED_CALL_WAITING_SYNC_TYPE_INT = "imsss.terminal_based_call_waiting_sync_type_int";
    field public static final String KEY_USE_CSFB_ON_XCAP_OVER_UT_FAILURE_BOOL = "imsss.use_csfb_on_xcap_over_ut_failure_bool";
    field public static final String KEY_UT_AS_SERVER_FQDN_STRING = "imsss.ut_as_server_fqdn_string";
    field public static final String KEY_UT_AS_SERVER_PORT_INT = "imsss.ut_as_server_port_int";
+2 −0
Original line number Diff line number Diff line
@@ -14650,6 +14650,7 @@ package android.telephony.ims {
    method public android.telephony.ims.stub.ImsFeatureConfiguration querySupportedImsFeatures();
    method public void readyForFeatureCreation();
    field public static final long CAPABILITY_SIP_DELEGATE_CREATION = 2L; // 0x2L
    field public static final long CAPABILITY_TERMINAL_BASED_CALL_WAITING = 4L; // 0x4L
  }
  public final class ImsSsData implements android.os.Parcelable {
@@ -15280,6 +15281,7 @@ package android.telephony.ims.feature {
    method public void onFeatureRemoved();
    method public boolean queryCapabilityConfiguration(int, int);
    method @NonNull public final android.telephony.ims.feature.MmTelFeature.MmTelCapabilities queryCapabilityStatus();
    method public void setTerminalBasedCallWaitingStatus(boolean);
    method public void setUiTtyMode(int, @Nullable android.os.Message);
    method public int shouldProcessCall(@NonNull String[]);
    field public static final String EXTRA_IS_UNKNOWN_CALL = "android.telephony.ims.feature.extra.IS_UNKNOWN_CALL";
+97 −0
Original line number Diff line number Diff line
@@ -7723,6 +7723,100 @@ public class CarrierConfigManager {
        public static final String KEY_XCAP_OVER_UT_SUPPORTED_RATS_INT_ARRAY =
                KEY_PREFIX + "xcap_over_ut_supported_rats_int_array";

        /** @hide */
        @IntDef({
            CALL_WAITING_SYNC_NONE,
            CALL_WAITING_SYNC_USER_CHANGE,
            CALL_WAITING_SYNC_FIRST_POWER_UP,
            CALL_WAITING_SYNC_FIRST_CHANGE,
            CALL_WAITING_SYNC_IMS_ONLY
        })

        public @interface CwSyncType {}

        /**
         * Do not synchronize the user's call waiting setting with the network. Call waiting is
         * always enabled on the carrier network and the user setting for call waiting is applied
         * on the terminal side. If the user disables call waiting, the call will be rejected on
         * the terminal.
         */
        public static final int CALL_WAITING_SYNC_NONE = 0;

        /**
         * The change of user’s setting is always passed to the carrier network
         * and then synchronized to the terminal based call waiting solution over IMS.
         * If changing the service over the carrier network is not successful,
         * the setting over IMS shall not be changed.
         */
        public static final int CALL_WAITING_SYNC_USER_CHANGE = 1;

        /**
         * Activate call waiting on the carrier network when the device boots or a subscription
         * using this carrier is loaded. Call waiting is always considered enabled on the carrier
         * network and the user setting for call waiting is applied on the terminal side only. If
         * the user disables call waiting, the call will be rejected on the terminal.
         * The mismatch between CS calls and IMS calls can happen when the network based call
         * waiting service is in disabled state in the legacy 3G/2G networks while it's enabled
         * in the terminal side.
         */
        public static final int CALL_WAITING_SYNC_FIRST_POWER_UP = 2;

        /**
         * Activate call waiting on the carrier network when the user enables call waiting the
         * first time. Call waiting is then always considered enabled on the carrier network. If
         * the user disables call waiting, the setting will only be applied to the terminal based
         * call waiting service and the call will be rejected on the terminal.
         * The mismatch between CS calls and IMS calls can happen when the network based call
         * waiting service is in disabled state in the legacy 3G/2G networks while it's enabled
         * in the terminal side. However, if the user retrieves the setting again when the device
         * is in the legacy 3G/2G networks, the correct state will be shown to the user.
         */
        public static final int CALL_WAITING_SYNC_FIRST_CHANGE = 3;

        /**
         * Do not synchronize the call waiting service state between the carrier network and
         * the terminal based IMS call waiting service. If the user changes the call waiting setting
         * when IMS is registered, the change will only be applied to the terminal based call
         * waiting service. If IMS is not registered when call waiting is changed, synchronize this
         * setting with the carrier network.
         */
        public static final int CALL_WAITING_SYNC_IMS_ONLY = 4;

        /** @hide */
        public static final int CALL_WAITING_SYNC_MAX = CALL_WAITING_SYNC_IMS_ONLY;

        /**
         * Flag indicating the way to synchronize the setting between CS and IMS.
         *
         * <p>Possible values are,
         * {@link #CALL_WAITING_SYNC_NONE},
         * {@link #CALL_WAITING_SYNC_USER_CHANGE},
         * {@link #CALL_WAITING_SYNC_FIRST_POWER_UP},
         * {@link #CALL_WAITING_SYNC_FIRST_CHANGE},
         * {@link #CALL_WAITING_SYNC_IMS_ONLY}.
         *
         * This configuration is valid only when
         * {@link #KEY_UT_TERMINAL_BASED_SERVICES_INT_ARRAY} includes
         * {@link #SUPPLEMENTARY_SERVICE_CW}.
         *
         * <p>If key is invalid or not configured, the default value
         * {@link #CALL_WAITING_SYNC_FIRST_CHANGE} will apply.
         */
        public static final String KEY_TERMINAL_BASED_CALL_WAITING_SYNC_TYPE_INT =
                KEY_PREFIX + "terminal_based_call_waiting_sync_type_int";

        /**
         * Flag indicating whether the user setting for terminal-based call waiting
         * is enabled by default or not.
         * This configuration is valid only when
         * {@link #KEY_UT_TERMINAL_BASED_SERVICES_INT_ARRAY} includes
         * {@link #SUPPLEMENTARY_SERVICE_CW}.
         *
         * The default value for this key is {@code true}.
         */
        public static final String KEY_TERMINAL_BASED_CALL_WAITING_DEFAULT_ENABLED_BOOL =
                KEY_PREFIX + "terminal_based_call_waiting_default_enabled_bool";

        private static PersistableBundle getDefaults() {
            PersistableBundle defaults = new PersistableBundle();
            defaults.putBoolean(KEY_UT_REQUIRES_IMS_REGISTRATION_BOOL, false);
@@ -7773,6 +7867,9 @@ public class CarrierConfigManager {
                        AccessNetworkType.IWLAN
                    });
            defaults.putString(KEY_UT_AS_SERVER_FQDN_STRING, "");
            defaults.putBoolean(KEY_TERMINAL_BASED_CALL_WAITING_DEFAULT_ENABLED_BOOL, true);
            defaults.putInt(KEY_TERMINAL_BASED_CALL_WAITING_SYNC_TYPE_INT,
                    CALL_WAITING_SYNC_FIRST_CHANGE);

            return defaults;
        }
+16 −2
Original line number Diff line number Diff line
@@ -139,13 +139,26 @@ public class ImsService extends Service {
     */
    public static final long CAPABILITY_SIP_DELEGATE_CREATION = 1 << 1;

    /**
     * This ImsService supports the terminal based call waiting service.
     * <p>
     * In order for the IMS service to support the service, IMS service shall
     * override {@link MmTelFeature#setTerminalBasedCallWaitingStatus}.
     * If ImsService has this capability, Android platform will handle the synchronization
     * between the network based call waiting service over circuit-switched networks and the
     * terminal based call waiting service of IMS service, and will handle the received
     * circuit-switched waiting calls. Otherwise, this functionality of Android platform shall
     * be disabled.
     */
    public static final long CAPABILITY_TERMINAL_BASED_CALL_WAITING = 1 << 2;

    /**
     * Used for internal correctness checks of capabilities set by the ImsService implementation and
     * tracks the index of the largest defined flag in the capabilities long.
     * @hide
     */
    public static final long CAPABILITY_MAX_INDEX =
            Long.numberOfTrailingZeros(CAPABILITY_SIP_DELEGATE_CREATION);
            Long.numberOfTrailingZeros(CAPABILITY_TERMINAL_BASED_CALL_WAITING);

    /**
     * @hide
@@ -156,7 +169,8 @@ public class ImsService extends Service {
                    // CAPABILITY_EMERGENCY_OVER_MMTEL is not included here because it is managed by
                    // whether or not ImsFeature.FEATURE_EMERGENCY_MMTEL feature is set and should
                    // not be set by users of ImsService.
                    CAPABILITY_SIP_DELEGATE_CREATION
                    CAPABILITY_SIP_DELEGATE_CREATION,
                    CAPABILITY_TERMINAL_BASED_CALL_WAITING
            })
    @Retention(RetentionPolicy.SOURCE)
    public @interface ImsServiceCapability {}
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ interface IImsMmTelFeature {
    void setUiTtyMode(int uiTtyMode, in Message onCompleteMessage);
    IImsMultiEndpoint getMultiEndpointInterface();
    int queryCapabilityStatus();
    void setTerminalBasedCallWaitingStatus(boolean enabled);
    oneway void addCapabilityCallback(IImsCapabilityCallback c);
    oneway void removeCapabilityCallback(IImsCapabilityCallback c);
    oneway void changeCapabilitiesConfiguration(in CapabilityChangeRequest request,
Loading