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

Commit 23fdc615 authored by Hyosun Kim's avatar Hyosun Kim
Browse files

Added carrier config and satellite restrict reason.

1. Added carrier config for holds the time interval for refreshing or re-querying the status from entitlement server to ensure it is the latest.
2. Added carrier config for enabling to query the entitlement server to get the satellite configuration.
3. Added reason for Satellite communication restricted by entitlement server.

Bug: 306670992
Test: atest SatelliteControllerTest
Test: atest TeleServiceTests
Test: atest SatelliteManagerTestOnMockService
Test: Manually test with mock entitlement server for satellite (ag/25356673).
1. Check if a query is triggered when data is connected or CarrierConfigChanged is received.
2. Check if the first query's response with a satellite service enabled triggers internally satellite enabled.
3. Check if a query is not made before the refresh time.
4. Check if the next query's response with a satellite service disabled triggers internally satellite disabled.

Change-Id: Ib04d327e26ddfdeb537417c84dd468d20a72794c
parent 64ba0466
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -43073,6 +43073,8 @@ package android.telephony {
    field public static final String KEY_RTT_UPGRADE_SUPPORTED_FOR_DOWNGRADED_VT_CALL_BOOL = "rtt_upgrade_supported_for_downgraded_vt_call";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String KEY_SATELLITE_ATTACH_SUPPORTED_BOOL = "satellite_attach_supported_bool";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String KEY_SATELLITE_CONNECTION_HYSTERESIS_SEC_INT = "satellite_connection_hysteresis_sec_int";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String KEY_SATELLITE_ENTITLEMENT_STATUS_REFRESH_DAYS_INT = "satellite_entitlement_status_refresh_days_int";
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final String KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL = "satellite_entitlement_supported_bool";
    field public static final String KEY_SHOW_4G_FOR_3G_DATA_ICON_BOOL = "show_4g_for_3g_data_icon_bool";
    field public static final String KEY_SHOW_4G_FOR_LTE_DATA_ICON_BOOL = "show_4g_for_lte_data_icon_bool";
    field public static final String KEY_SHOW_APN_SETTING_CDMA_BOOL = "show_apn_setting_cdma_bool";
+1 −0
Original line number Diff line number Diff line
@@ -17071,6 +17071,7 @@ package android.telephony.satellite {
    field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NT_RADIO_TECHNOLOGY_NR_NTN = 2; // 0x2
    field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NT_RADIO_TECHNOLOGY_PROPRIETARY = 4; // 0x4
    field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int NT_RADIO_TECHNOLOGY_UNKNOWN = 0; // 0x0
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final int SATELLITE_COMMUNICATION_RESTRICTION_REASON_ENTITLEMENT = 2; // 0x2
    field @FlaggedApi("com.android.internal.telephony.flags.carrier_enabled_satellite_flag") public static final int SATELLITE_COMMUNICATION_RESTRICTION_REASON_GEOLOCATION = 1; // 0x1
    field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_IDLE = 0; // 0x0
    field @FlaggedApi("com.android.internal.telephony.flags.oem_enabled_satellite_flag") public static final int SATELLITE_DATAGRAM_TRANSFER_STATE_RECEIVE_FAILED = 7; // 0x7
+23 −0
Original line number Diff line number Diff line
@@ -9693,6 +9693,27 @@ public class CarrierConfigManager {
    public static final String KEY_REMOVE_SATELLITE_PLMN_IN_MANUAL_NETWORK_SCAN_BOOL =
            "remove_satellite_plmn_in_manual_network_scan_bool";
    /**
     * An integer key holds the time interval for refreshing or re-querying the satellite
     * entitlement status from the entitlement server to ensure it is the latest.
     *
     * The default value is 30 days (1 month).
     */
    @FlaggedApi(Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
    public static final String KEY_SATELLITE_ENTITLEMENT_STATUS_REFRESH_DAYS_INT =
            "satellite_entitlement_status_refresh_days_int";
    /**
     * This configuration enables device to query the entitlement server to get the satellite
     * configuration.
     * This will need agreement the carrier before enabling this flag.
     *
     * The default value is false.
     */
    @FlaggedApi(Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
    public static final String KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL =
            "satellite_entitlement_supported_bool";
    /**
     * 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.
@@ -10799,6 +10820,8 @@ public class CarrierConfigManager {
        sDefaults.putInt(KEY_PARAMETERS_USED_FOR_NTN_LTE_SIGNAL_BAR_INT,
                CellSignalStrengthLte.USE_RSRP);
        sDefaults.putBoolean(KEY_REMOVE_SATELLITE_PLMN_IN_MANUAL_NETWORK_SCAN_BOOL, true);
        sDefaults.putInt(KEY_SATELLITE_ENTITLEMENT_STATUS_REFRESH_DAYS_INT, 30);
        sDefaults.putBoolean(KEY_SATELLITE_ENTITLEMENT_SUPPORTED_BOOL, false);
        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);
+10 −1
Original line number Diff line number Diff line
@@ -928,10 +928,19 @@ public final class SatelliteManager {
    @FlaggedApi(Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
    public static final int SATELLITE_COMMUNICATION_RESTRICTION_REASON_GEOLOCATION = 1;

    /**
     * Satellite communication restricted by entitlement server. This can be triggered based on
     * the EntitlementStatus value received from the entitlement server to enable or disable
     * satellite.
     */
    @FlaggedApi(Flags.FLAG_CARRIER_ENABLED_SATELLITE_FLAG)
    public static final int SATELLITE_COMMUNICATION_RESTRICTION_REASON_ENTITLEMENT = 2;

    /** @hide */
    @IntDef(prefix = "SATELLITE_COMMUNICATION_RESTRICTION_REASON_", value = {
            SATELLITE_COMMUNICATION_RESTRICTION_REASON_USER,
            SATELLITE_COMMUNICATION_RESTRICTION_REASON_GEOLOCATION
            SATELLITE_COMMUNICATION_RESTRICTION_REASON_GEOLOCATION,
            SATELLITE_COMMUNICATION_RESTRICTION_REASON_ENTITLEMENT
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface SatelliteCommunicationRestrictionReason {}