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

Commit 14ec7c25 authored by Thomas Nguyen's avatar Thomas Nguyen
Browse files

Add satellite access control overlay config

Bug: 313773568
Test: atest SatelliteAccessControllerTest
atest SatelliteManagerTestOnMockService

Change-Id: If7d01435a07a3e5e5800eeeceda3fa874dabb68f
parent ab4ae770
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -212,6 +212,36 @@
    <bool name="config_send_satellite_datagram_to_modem_in_demo_mode">false</bool>
    <java-symbol type="bool" name="config_send_satellite_datagram_to_modem_in_demo_mode" />

    <!-- List of country codes where oem-enabled satellite services are either allowed or disallowed
         by the device. Each country code is a lowercase 2 character ISO-3166-1 alpha-2.
         -->
    <string-array name="config_oem_enabled_satellite_country_codes">
    </string-array>
    <java-symbol type="array" name="config_oem_enabled_satellite_country_codes" />

    <!-- The file storing S2-cell-based satellite access restriction of the countries defined by
         config_oem_enabled_satellite_countries. -->
    <string name="config_oem_enabled_satellite_s2cell_file"></string>
    <java-symbol type="string" name="config_oem_enabled_satellite_s2cell_file" />

    <!-- Whether to treat the countries defined by the config_oem_enabled_satellite_countries
         as satellite-allowed areas. The default true value means the countries defined by
         config_oem_enabled_satellite_countries will be treated as satellite-allowed areas.
         -->
    <bool name="config_oem_enabled_satellite_access_allow">true</bool>
    <java-symbol type="bool" name="config_oem_enabled_satellite_access_allow" />

    <!-- The time duration in seconds which is used to decide whether the Location returned from
         LocationManager#getLastKnownLocation is fresh.

         The Location is considered fresh if the duration from the Location's elapsed real time to
         the current elapsed real time is less than this config. If the Location is considered
         fresh, it will be used as the current location by Telephony to decide whether satellite
         services should be allowed.
         -->
    <integer name="config_oem_enabled_satellite_location_fresh_duration">600</integer>
    <java-symbol type="integer" name="config_oem_enabled_satellite_location_fresh_duration" />

    <!-- Whether enhanced IWLAN handover check is enabled. If enabled, telephony frameworks
         will not perform handover if the target transport is out of service, or VoPS not
         supported. The network will be torn down on the source transport, and will be
+2 −0
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ applications that come with the platform
        <permission name="android.permission.CONTROL_INCALL_EXPERIENCE"/>
        <permission name="android.permission.DUMP"/>
        <permission name="android.permission.INTERACT_ACROSS_USERS"/>
        <permission name="android.permission.LOCATION_BYPASS"/>
        <permission name="android.permission.LOCAL_MAC_ADDRESS"/>
        <permission name="android.permission.MANAGE_USERS"/>
        <permission name="android.permission.MANAGE_SUBSCRIPTION_PLANS" />
@@ -149,6 +150,7 @@ applications that come with the platform
        <permission name="android.permission.REGISTER_CALL_PROVIDER"/>
        <permission name="android.permission.REGISTER_SIM_SUBSCRIPTION"/>
        <permission name="android.permission.REGISTER_STATS_PULL_ATOM"/>
        <permission name="android.permission.SATELLITE_COMMUNICATION"/>
        <permission name="android.permission.SEND_RESPOND_VIA_MESSAGE"/>
        <permission name="android.permission.SHUTDOWN"/>
        <permission name="android.permission.START_ACTIVITIES_FROM_BACKGROUND"/>
+23 −0
Original line number Diff line number Diff line
@@ -3054,6 +3054,29 @@ interface ITelephony {
     */
    boolean setEmergencyCallToSatelliteHandoverType(int handoverType, int delaySeconds);

    /**
     * This API should be used by only CTS tests to forcefully set the country codes.
     *
     * @param reset {@code true} mean the overridden country codes should not be used, {@code false}
     *              otherwise.
     * @return {@code true} if the country code is set successfully, {@code false} otherwise.
     */
    boolean setCountryCodes(in boolean reset, in List<String> currentNetworkCountryCodes,
            in Map cachedNetworkCountryCodes, in String locationCountryCode,
            in long locationCountryCodeTimestampNanos);

    /**
     * This API should be used by only CTS tests to override the overlay configs of satellite
     * access controller.
     *
     * @param reset {@code true} mean the overridden configs should not be used, {@code false}
     *              otherwise.
     * @return {@code true} if the overlay configs are set successfully, {@code false} otherwise.
     */
    boolean setSatelliteAccessControlOverlayConfigs(in boolean reset, in boolean isAllowed,
            in String s2CellFile, in long locationFreshDurationNanos,
            in List<String> satelliteCountryCodes);

    /**
     * Test method to confirm the file contents are not altered.
     */