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

Commit 0d631aca authored by Nathan Harold's avatar Nathan Harold Committed by Android (Google) Code Review
Browse files

Merge changes from topic "usage-setting"

* changes:
  Expose Usage Setting API
  Add DeviceConfigs for Usage Setting
  Add set/getUsageSetting APIs
  Update SubscriptionInfo
  Add Usage Setting to SIMINFO
  Add Use Setting Constants
  Add a carrier config for cellular usage setting
parents 65094b9d dff34b3a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -41476,6 +41476,7 @@ package android.telephony {
    field public static final String KEY_CDMA_NONROAMING_NETWORKS_STRING_ARRAY = "cdma_nonroaming_networks_string_array";
    field public static final String KEY_CDMA_ROAMING_MODE_INT = "cdma_roaming_mode_int";
    field public static final String KEY_CDMA_ROAMING_NETWORKS_STRING_ARRAY = "cdma_roaming_networks_string_array";
    field public static final String KEY_CELLULAR_USAGE_SETTING_INT = "cellular_usage_setting_int";
    field public static final String KEY_CHECK_PRICING_WITH_CARRIER_FOR_DATA_ROAMING_BOOL = "check_pricing_with_carrier_data_roaming_bool";
    field public static final String KEY_CI_ACTION_ON_SYS_UPDATE_BOOL = "ci_action_on_sys_update_bool";
    field public static final String KEY_CI_ACTION_ON_SYS_UPDATE_EXTRA_STRING = "ci_action_on_sys_update_extra_string";
@@ -43092,6 +43093,7 @@ package android.telephony {
    method public int getSimSlotIndex();
    method public int getSubscriptionId();
    method public int getSubscriptionType();
    method public int getUsageSetting();
    method public boolean isEmbedded();
    method public boolean isOpportunistic();
    method public void writeToParcel(android.os.Parcel, int);
@@ -43166,6 +43168,10 @@ package android.telephony {
    field public static final int PHONE_NUMBER_SOURCE_UICC = 1; // 0x1
    field public static final int SUBSCRIPTION_TYPE_LOCAL_SIM = 0; // 0x0
    field public static final int SUBSCRIPTION_TYPE_REMOTE_SIM = 1; // 0x1
    field public static final int USAGE_SETTING_DATA_CENTRIC = 2; // 0x2
    field public static final int USAGE_SETTING_DEFAULT = 0; // 0x0
    field public static final int USAGE_SETTING_UNKNOWN = -1; // 0xffffffff
    field public static final int USAGE_SETTING_VOICE_CENTRIC = 1; // 0x1
  }
  public static class SubscriptionManager.OnOpportunisticSubscriptionsChangedListener {
+7 −0
Original line number Diff line number Diff line
@@ -5453,5 +5453,12 @@ public final class Telephony {
         */
        public static final String COLUMN_PHONE_NUMBER_SOURCE_IMS =
                "phone_number_source_ims";

        /**
         * TelephonyProvider column name for the device's preferred usage setting.
         *
         * @hide
         */
        public static final String COLUMN_USAGE_SETTING = "usage_setting";
    }
}
+14 −0
Original line number Diff line number Diff line
@@ -3333,6 +3333,20 @@
         and one pSIM) -->
    <integer name="config_num_physical_slots">1</integer>

    <!--The default "usage setting" indicating that the device is either a voice-centric
    device (1) or a data-centric device (2). A voice-centric device will require that any cellular
    service that it uses provides access to voice capability, and a data-centric device will
    likewise require that the network provides access to data services. These settings are
    sent to the cellular modem and control the behavior in accordance with 3gpp TS 24.301 sec 4.3
    (and equivalent functionality in other generations of cellular).-->
    <integer name="config_default_cellular_usage_setting">1</integer>

    <!--The list of supported cellular usage settings for this device.-->
    <integer-array translatable="false" name="config_supported_cellular_usage_settings">
        <item>1</item>    <!-- USAGE_SETTING_VOICE_CENTRIC -->
        <item>2</item>    <!-- USAGE_SETTING_DATA_CENTRIC -->
    </integer-array>

    <!-- When a radio power off request is received, we will delay completing the request until
         either IMS moves to the deregistered state or the timeout defined by this configuration
         elapses. If 0, this feature is disabled and we do not delay radio power off requests.-->
+2 −0
Original line number Diff line number Diff line
@@ -492,6 +492,8 @@
  <java-symbol type="string" name="config_deviceSpecificDevicePolicyManagerService" />
  <java-symbol type="string" name="config_deviceSpecificAudioService" />
  <java-symbol type="integer" name="config_num_physical_slots" />
  <java-symbol type="integer" name="config_default_cellular_usage_setting" />
  <java-symbol type="array" name="config_supported_cellular_usage_settings" />
  <java-symbol type="integer" name="config_delay_for_ims_dereg_millis" />
  <java-symbol type="array" name="config_integrityRuleProviderPackages" />
  <java-symbol type="bool" name="config_useAssistantVolume" />
+25 −0
Original line number Diff line number Diff line
@@ -4465,6 +4465,29 @@ public class CarrierConfigManager {
    public static final String KEY_SUBSCRIPTION_GROUP_UUID_STRING =
            "subscription_group_uuid_string";

    /**
     * Controls the cellular usage setting.
     *
     * The usage setting indicates whether a device will remain attached to a network based on
     * the primary use case for the service. A device will detach and search for a more-preferred
     * network if the primary use case (voice or data) is not satisfied. Depending on the type
     * of device, it may operate in a voice or data-centric mode by default.
     *
     * <p>Sets the usage setting in accordance with 3gpp 24.301 sec 4.3 and 3gpp 24.501 sec 4.3.
     * Also refer to "UE's usage setting" as defined in 3gpp 24.301 section 3.1 and 3gpp 23.221
     * Annex A.
     *
     * Either omit this key or pass a value of
     * {@link SubscriptionManager#USAGE_SETTING_UNKNOWN unknown} to preserve the current setting.
     *
     * {@link SubscriptionManager#USAGE_SETTING_DEFAULT default},
     * {@link SubscriptionManager#USAGE_SETTING_VOICE_CENTRIC voice-centric},
     * or {@link SubscriptionManager#USAGE_SETTING_DATA_CENTRIC data-centric}.
     * {@see SubscriptionInfo#getUsageSetting}
     */
    public static final String KEY_CELLULAR_USAGE_SETTING_INT =
            "cellular_usage_setting_int";

    /**
     * Data switch validation minimal gap time, in milliseconds.
     *
@@ -6087,6 +6110,8 @@ public class CarrierConfigManager {
        sDefaults.putStringArray(KEY_IWLAN_HANDOVER_POLICY_STRING_ARRAY, new String[]{
                "source=GERAN|UTRAN|EUTRAN|NGRAN|IWLAN, "
                        + "target=GERAN|UTRAN|EUTRAN|NGRAN|IWLAN, type=allowed"});
        sDefaults.putInt(KEY_CELLULAR_USAGE_SETTING_INT,
                SubscriptionManager.USAGE_SETTING_UNKNOWN);
    }

    /**
Loading