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

Commit c5e8dce8 authored by Hyosun Kim's avatar Hyosun Kim Committed by Android (Google) Code Review
Browse files

Merge "Support for LTE Signal Strength over NTN network" into main

parents fce39f14 6d13f8f0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -43360,6 +43360,9 @@ package android.telephony {
    field public static final String KEY_MMS_UA_PROF_URL_STRING = "uaProfUrl";
    field public static final String KEY_MMS_USER_AGENT_STRING = "userAgent";
    field public static final String KEY_MONTHLY_DATA_CYCLE_DAY_INT = "monthly_data_cycle_day_int";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String KEY_NTN_LTE_RSRP_THRESHOLDS_INT_ARRAY = "ntn_lte_rsrp_thresholds_int_array";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String KEY_NTN_LTE_RSRQ_THRESHOLDS_INT_ARRAY = "ntn_lte_rsrq_thresholds_int_array";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String KEY_NTN_LTE_RSSNR_THRESHOLDS_INT_ARRAY = "ntn_lte_rssnr_thresholds_int_array";
    field public static final String KEY_ONLY_AUTO_SELECT_IN_HOME_NETWORK_BOOL = "only_auto_select_in_home_network";
    field public static final String KEY_ONLY_SINGLE_DC_ALLOWED_INT_ARRAY = "only_single_dc_allowed_int_array";
    field public static final String KEY_OPERATOR_SELECTION_EXPAND_BOOL = "operator_selection_expand_bool";
@@ -43374,6 +43377,7 @@ package android.telephony {
    field public static final String KEY_OPPORTUNISTIC_NETWORK_EXIT_THRESHOLD_RSSNR_INT = "opportunistic_network_exit_threshold_rssnr_int";
    field public static final String KEY_OPPORTUNISTIC_NETWORK_MAX_BACKOFF_TIME_LONG = "opportunistic_network_max_backoff_time_long";
    field public static final String KEY_OPPORTUNISTIC_NETWORK_PING_PONG_TIME_LONG = "opportunistic_network_ping_pong_time_long";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String KEY_PARAMETERS_USED_FOR_NTN_LTE_SIGNAL_BAR_INT = "parameters_used_for_ntn_lte_signal_bar_int";
    field public static final String KEY_PING_TEST_BEFORE_DATA_SWITCH_BOOL = "ping_test_before_data_switch_bool";
    field public static final String KEY_PREFER_2G_BOOL = "prefer_2g_bool";
    field public static final String KEY_PREMIUM_CAPABILITY_MAXIMUM_DAILY_NOTIFICATION_COUNT_INT = "premium_capability_maximum_daily_notification_count_int";
+104 −0
Original line number Diff line number Diff line
@@ -9592,6 +9592,84 @@ public class CarrierConfigManager {
    public static final String KEY_SATELLITE_CONNECTION_HYSTERESIS_SEC_INT =
            "satellite_connection_hysteresis_sec_int";
    /**
     * This threshold is used when connected to a non-terrestrial LTE network.
     * A list of 4 NTN LTE RSRP thresholds above which a signal level is considered POOR,
     * MODERATE, GOOD, or EXCELLENT, to be used in SignalStrength reporting.
     *
     * Note that the min and max thresholds are fixed at -140 and -44, as explained in
     * TS 136.133 9.1.4 - RSRP Measurement Report Mapping.
     * <p>
     * See SignalStrength#MAX_LTE_RSRP and SignalStrength#MIN_LTE_RSRP. Any signal level outside
     * these boundaries is considered invalid.
     */
    @FlaggedApi(Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
    public static final String KEY_NTN_LTE_RSRP_THRESHOLDS_INT_ARRAY =
            "ntn_lte_rsrp_thresholds_int_array";
    /**
     * This threshold is used when connected to a non-terrestrial LTE network.
     * A list of 4 customized NTN LTE Reference Signal Received Quality (RSRQ) thresholds.
     *
     * Reference: TS 136.133 v12.6.0 section 9.1.7 - RSRQ Measurement Report Mapping.
     *
     * 4 threshold integers must be within the boundaries [-34 dB, 3 dB], and the levels are:
     *     "NONE: [-34, threshold1)"
     *     "POOR: [threshold1, threshold2)"
     *     "MODERATE: [threshold2, threshold3)"
     *     "GOOD:  [threshold3, threshold4)"
     *     "EXCELLENT:  [threshold4, 3]"
     *
     * This key is considered invalid if the format is violated. If the key is invalid or
     * not configured, a default value set will apply.
     */
    @FlaggedApi(Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
    public static final String KEY_NTN_LTE_RSRQ_THRESHOLDS_INT_ARRAY =
            "ntn_lte_rsrq_thresholds_int_array";
    /**
     * This threshold is used when connected to a non-terrestrial LTE network.
     * A list of 4 customized NTN LTE Reference Signal Signal to Noise Ratio (RSSNR) thresholds.
     *
     * 4 threshold integers must be within the boundaries [-20 dB, 30 dB], and the levels are:
     *     "NONE: [-20, threshold1)"
     *     "POOR: [threshold1, threshold2)"
     *     "MODERATE: [threshold2, threshold3)"
     *     "GOOD:  [threshold3, threshold4)"
     *     "EXCELLENT:  [threshold4, 30]"
     *
     * This key is considered invalid if the format is violated. If the key is invalid or
     * not configured, a default value set will apply.
     */
    @FlaggedApi(Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
    public static final String KEY_NTN_LTE_RSSNR_THRESHOLDS_INT_ARRAY =
            "ntn_lte_rssnr_thresholds_int_array";
    /**
     * This threshold is used when connected to a non-terrestrial LTE network.
     * Bit-field integer to determine whether to use Reference Signal Received Power (RSRP),
     * Reference Signal Received Quality (RSRQ), or/and Reference Signal Signal to Noise Ratio
     * (RSSNR) for the number of NTN LTE signal bars and signal criteria reporting enabling.
     *
     * <p> If a measure is not set, signal criteria reporting from modem will not be triggered and
     * not be used for calculating signal level. If multiple measures are set bit, the parameter
     * whose value is smallest is used to indicate the signal level.
     * <UL>
     *  <LI>RSRP = 1 << 0</LI>
     *  <LI>RSRQ = 1 << 1</LI>
     *  <LI>RSSNR = 1 << 2</LI>
     * </UL>
     * <p> The value of this key must be bitwise OR of CellSignalStrengthLte#USE_RSRP,
     * CellSignalStrengthLte#USE_RSRQ, CellSignalStrengthLte#USE_RSSNR.
     *
     * <p> For example, if both RSRP and RSRQ are used, the value of key is 3 (1 << 0 | 1 << 1).
     * If the key is invalid or not configured, a default value (RSRP = 1 << 0) will apply.
     *
     */
    @FlaggedApi(Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
    public static final String KEY_PARAMETERS_USED_FOR_NTN_LTE_SIGNAL_BAR_INT =
            "parameters_used_for_ntn_lte_signal_bar_int";
    /**
     * Indicating whether DUN APN should be disabled when the device is roaming. In that case,
     * the default APN (i.e. internet) will be used for tethering.
@@ -10628,6 +10706,32 @@ public class CarrierConfigManager {
                PersistableBundle.EMPTY);
        sDefaults.putBoolean(KEY_SATELLITE_ATTACH_SUPPORTED_BOOL, false);
        sDefaults.putInt(KEY_SATELLITE_CONNECTION_HYSTERESIS_SEC_INT, 300);
        sDefaults.putIntArray(KEY_NTN_LTE_RSRP_THRESHOLDS_INT_ARRAY,
                // Boundaries: [-140 dBm, -44 dBm]
                new int[]{
                        -128, /* SIGNAL_STRENGTH_POOR */
                        -118, /* SIGNAL_STRENGTH_MODERATE */
                        -108, /* SIGNAL_STRENGTH_GOOD */
                        -98  /* SIGNAL_STRENGTH_GREAT */
                });
        sDefaults.putIntArray(KEY_NTN_LTE_RSRQ_THRESHOLDS_INT_ARRAY,
                // Boundaries: [-34 dB, 3 dB]
                new int[]{
                        -20, /* SIGNAL_STRENGTH_POOR */
                        -17, /* SIGNAL_STRENGTH_MODERATE */
                        -14, /* SIGNAL_STRENGTH_GOOD */
                        -11  /* SIGNAL_STRENGTH_GREAT */
                });
        sDefaults.putIntArray(KEY_NTN_LTE_RSSNR_THRESHOLDS_INT_ARRAY,
                // Boundaries: [-20 dBm, 30 dBm]
                new int[] {
                        -3, /* SIGNAL_STRENGTH_POOR */
                        1, /* SIGNAL_STRENGTH_MODERATE */
                        5,  /* SIGNAL_STRENGTH_GOOD */
                        13   /* SIGNAL_STRENGTH_GREAT */
                });
        sDefaults.putInt(KEY_PARAMETERS_USED_FOR_NTN_LTE_SIGNAL_BAR_INT,
                CellSignalStrengthLte.USE_RSRP);
        sDefaults.putBoolean(KEY_DISABLE_DUN_APN_WHILE_ROAMING_WITH_PRESET_APN_BOOL, false);
        sDefaults.putString(KEY_DEFAULT_PREFERRED_APN_NAME_STRING, "");
        sDefaults.putBoolean(KEY_SUPPORTS_CALL_COMPOSER_BOOL, false);
+22 −16
Original line number Diff line number Diff line
@@ -262,30 +262,36 @@ public final class CellSignalStrengthLte extends CellSignalStrength implements P
            rsrqThresholds = sRsrqThresholds;
            rssnrThresholds = sRssnrThresholds;
            rsrpOnly = false;
        } else {
            if (ss != null && ss.isUsingNonTerrestrialNetwork()) {
                if (DBG) log("updateLevel: from NTN_LTE");
                mParametersUseForLevel = cc.getInt(
                        CarrierConfigManager.KEY_PARAMETERS_USED_FOR_NTN_LTE_SIGNAL_BAR_INT);
                rsrpThresholds = cc.getIntArray(
                        CarrierConfigManager.KEY_NTN_LTE_RSRP_THRESHOLDS_INT_ARRAY);
                rsrqThresholds = cc.getIntArray(
                        CarrierConfigManager.KEY_NTN_LTE_RSRQ_THRESHOLDS_INT_ARRAY);
                rssnrThresholds = cc.getIntArray(
                        CarrierConfigManager.KEY_NTN_LTE_RSSNR_THRESHOLDS_INT_ARRAY);
            } else {
                mParametersUseForLevel = cc.getInt(
                        CarrierConfigManager.KEY_PARAMETERS_USED_FOR_LTE_SIGNAL_BAR_INT);
            if (DBG) {
                Rlog.i(LOG_TAG, "Using signal strength level: " + mParametersUseForLevel);
            }
                rsrpThresholds = cc.getIntArray(
                        CarrierConfigManager.KEY_LTE_RSRP_THRESHOLDS_INT_ARRAY);
            if (rsrpThresholds == null) rsrpThresholds = sRsrpThresholds;
            if (DBG) {
                Rlog.i(LOG_TAG, "Applying LTE RSRP Thresholds: "
                        + Arrays.toString(rsrpThresholds));
            }
                rsrqThresholds = cc.getIntArray(
                        CarrierConfigManager.KEY_LTE_RSRQ_THRESHOLDS_INT_ARRAY);
            if (rsrqThresholds == null) rsrqThresholds = sRsrqThresholds;
            if (DBG) {
                Rlog.i(LOG_TAG, "Applying LTE RSRQ Thresholds: "
                        + Arrays.toString(rsrqThresholds));
            }
                rssnrThresholds = cc.getIntArray(
                        CarrierConfigManager.KEY_LTE_RSSNR_THRESHOLDS_INT_ARRAY);
            }
            if (rsrpThresholds == null) rsrpThresholds = sRsrpThresholds;
            if (rsrqThresholds == null) rsrqThresholds = sRsrqThresholds;
            if (rssnrThresholds == null) rssnrThresholds = sRssnrThresholds;
            if (DBG) {
                Rlog.i(LOG_TAG, "Using signal strength level: " + mParametersUseForLevel);
                Rlog.i(LOG_TAG, "Applying LTE RSRP Thresholds: "
                        + Arrays.toString(rsrpThresholds));
                Rlog.i(LOG_TAG, "Applying LTE RSRQ Thresholds: "
                        + Arrays.toString(rsrqThresholds));
                Rlog.i(LOG_TAG, "Applying LTE RSSNR Thresholds: "
                        + Arrays.toString(rssnrThresholds));
            }