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

Commit d6f48772 authored by Ling Ma's avatar Ling Ma Committed by Automerger Merge Worker
Browse files

Merge "Configure auto data switch score table" into udc-qpr-dev am: 8e8f4612 am: 42252c6e

parents f2d759d6 42252c6e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -67,6 +67,15 @@
    <bool name="auto_data_switch_ping_test_before_switch">true</bool>
    <java-symbol type="bool" name="auto_data_switch_ping_test_before_switch" />

    <!-- Define the tolerated gap of score for auto data switch decision, larger than which the
         device will switch to the SIM with higher score. The score is used in conjunction with the
         score table defined in
         CarrierConfigManager#KEY_AUTO_DATA_SWITCH_RAT_SIGNAL_SCORE_STRING_ARRAY.
         If 0, the device always switch to the higher score SIM.
         If < 0, the network type and signal strength based auto switch is disabled. -->
    <integer name="auto_data_switch_score_tolerance">3000</integer>
    <java-symbol type="integer" name="auto_data_switch_score_tolerance" />

    <!-- Boolean indicating whether the Iwlan data service supports persistence of iwlan ipsec
         tunnels across service restart. If iwlan tunnels are not persisted across restart,
         Framework will clean up dangling data connections when service restarts -->
+66 −0
Original line number Diff line number Diff line
@@ -9737,6 +9737,27 @@ public class CarrierConfigManager {
    public static final String KEY_IWLAN_HANDOVER_POLICY_STRING_ARRAY =
            "iwlan_handover_policy_string_array";

    /**
     * Score table for {@link TelephonyManager#MOBILE_DATA_POLICY_AUTO_DATA_SWITCH}. The score is
     * used in conjunction with a tolerance value defined in resource config
     * {@code auto_data_switch_score_tolerance}, greater than which device will switch to the sub
     * with higher score.
     * Possible keys are network type name string(also see {@link #KEY_BANDWIDTH_STRING_ARRAY}).
     * Value should be "score_level_0, score_level_1, score_level_2, score_level_3,score_level_4".
     * Each network type must have 5 scores correspond to {@link CellSignalStrength}, where score is
     * a non-negative integer. A score of 0 is treated the same as data out of service.
     *
     * For NR (5G), the following network names should be used:
     * - NR_NSA: NR NSA, sub-6 frequencies
     * - NR_NSA_MMWAVE: NR NSA, mmwave frequencies
     * - NR_SA: NR SA, sub-6 frequencies
     * - NR_SA_MMWAVE: NR SA, mmwave frequencies
     *
     * @hide
     */
    public static final String KEY_AUTO_DATA_SWITCH_RAT_SIGNAL_SCORE_BUNDLE =
            "auto_data_switch_rat_signal_score_string_bundle";

    /** The default value for every variable. */
    private static final PersistableBundle sDefaults;

@@ -10412,6 +10433,51 @@ 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"});
        PersistableBundle auto_data_switch_rat_signal_score_string_bundle = new PersistableBundle();
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "NR_SA_MMWAVE", new int[]{10000, 13227, 16000, 18488, 20017});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "NR_NSA_MMWAVE", new int[]{8000, 10227, 12488, 15017, 15278});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "LTE", new int[]{3731, 5965, 8618, 11179, 13384});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "NR_SA", new int[]{5288, 6795, 6955, 7562, 9713});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "NR_NSA", new int[]{5463, 6827, 8029, 9007, 9428});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "UMTS", new int[]{100, 169, 183, 192, 300});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "eHRPD", new int[]{10, 400, 600, 800, 1000});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "TD_SCDMA", new int[]{1, 100, 500, 1000});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "iDEN", new int[]{1, 2, 10, 50, 100});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "EvDo_B", new int[]{1000, 1495, 2186, 2532, 2600});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "HSPA+", new int[]{1619, 2500, 3393, 4129, 4212});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "HSPA", new int[]{1000, 1495, 2186, 2532, 2544});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "HSUPA", new int[]{1500, 1919, 2132, 2362, 2704});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "HSDPA", new int[]{1500, 1732, 4000, 7000, 8000});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "EvDo_A", new int[]{600, 840, 1200, 1300, 1400});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "EvDo_0", new int[]{300, 600, 1000, 1500, 2000});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "1xRTT", new int[]{50, 60, 70, 80});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "EDGE", new int[]{154, 169, 183, 192, 267});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "GPRS", new int[]{15, 30, 40, 45, 50});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "CDMA", new int[]{1, 50, 100, 300, 2000});
        auto_data_switch_rat_signal_score_string_bundle.putIntArray(
                "GSM", new int[]{1, 2, 10, 50, 100});
        sDefaults.putPersistableBundle(KEY_AUTO_DATA_SWITCH_RAT_SIGNAL_SCORE_BUNDLE,
                auto_data_switch_rat_signal_score_string_bundle);
        sDefaults.putInt(KEY_CELLULAR_USAGE_SETTING_INT,
                SubscriptionManager.USAGE_SETTING_UNKNOWN);
        // Default data stall recovery configurations.