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

Commit 5713cf3a authored by Thomas Nguyen's avatar Thomas Nguyen Committed by Android (Google) Code Review
Browse files

Merge "Add overlay configs for sending and enabling timeout" into main

parents 132afa2b 3df560c8
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -172,6 +172,35 @@
    <integer name="config_satellite_nb_iot_inactivity_timeout_millis">180000</integer>
    <java-symbol type="integer" name="config_satellite_nb_iot_inactivity_timeout_millis" />

    <!-- The time duration in millis needed to switch the modem image from TN to NTN. -->
    <integer name="config_satellite_modem_image_switching_duration_millis">20000</integer>
    <java-symbol type="integer" name="config_satellite_modem_image_switching_duration_millis" />

    <!-- The time duration in millis after which Telephony will abort the datagram sending requests.
         Telephony starts a timer when receiving a datagram sending request in either OFF, IDLE, or
         NOT_CONNECTED state. In NOT_CONNECTED, the duration of the timer is given by this config.
         In OFF or IDLE state, the duration of the timer is the sum of this config and the
         config_satellite_modem_image_switching_duration_millis.
         -->
    <integer name="config_datagram_wait_for_connected_state_timeout_millis">60000</integer>
    <java-symbol type="integer" name="config_datagram_wait_for_connected_state_timeout_millis" />

    <!-- The time duration in millis after which Telephony will stop waiting for the response of the
         satellite enable request from modem, and send failure response to the client that has
         requested Telephony to enable satellite.
         -->
    <integer name="config_wait_for_satellite_enabling_response_timeout_millis">180000</integer>
    <java-symbol type="integer" name="config_wait_for_satellite_enabling_response_timeout_millis" />

    <!-- The time duration in millis after which Telephony will abort the datagram sending requests
         and send failure response to the client that has requested sending the datagrams. Telephony
         starts a timer after pushing down the datagram sending request to modem. Before expiry, the
         timer will be stopped when Telephony receives the response for the sending request from
         modem.
         -->
    <integer name="config_wait_for_datagram_sending_response_timeout_millis">180000</integer>
    <java-symbol type="integer" name="config_wait_for_datagram_sending_response_timeout_millis" />

    <!-- The timeout duration in milliseconds to determine whether to recommend Dialer to show the
         emergency messaging option to users.

+18 −0
Original line number Diff line number Diff line
@@ -501,4 +501,22 @@ oneway interface ISatellite {
     *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
     */
     void stopSendingNtnSignalStrength(in IIntegerConsumer resultCallback);

     /**
      * Abort all outgoing satellite datagrams which vendor service has received from Telephony
      * framework.
      *
      * This API helps modem to be in sync with framework when framework times out on sending
      * datagrams.
      *
      * @param resultCallback The callback to receive the error code result of the operation.
      *
      * Valid result codes returned:
      *   SatelliteResult:SATELLITE_RESULT_SUCCESS
      *   SatelliteResult:SATELLITE_RESULT_INVALID_MODEM_STATE
      *   SatelliteResult:SATELLITE_RESULT_MODEM_ERROR
      *   SatelliteResult:SATELLITE_RESULT_RADIO_NOT_AVAILABLE
      *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
      */
     void abortSendingSatelliteDatagrams(in IIntegerConsumer resultCallback);
}
+17 −0
Original line number Diff line number Diff line
@@ -265,6 +265,14 @@ public class SatelliteImplBase extends SatelliteService {
                    "stopSendingNtnSignalStrength");
        }

        @Override
        public void abortSendingSatelliteDatagrams(IIntegerConsumer resultCallback)
                throws RemoteException {
            executeMethodAsync(
                    () -> SatelliteImplBase.this.abortSendingSatelliteDatagrams(resultCallback),
                    "abortSendingSatelliteDatagrams");
        }

        // Call the methods with a clean calling identity on the executor and wait indefinitely for
        // the future to return.
        private void executeMethodAsync(Runnable r, String errorLogName) throws RemoteException {
@@ -783,4 +791,13 @@ public class SatelliteImplBase extends SatelliteService {
    public void stopSendingNtnSignalStrength(@NonNull IIntegerConsumer resultCallback){
        // stub implementation
    }

    /**
     * Requests to abort sending satellite datagrams
     *
     * @param resultCallback The {@link SatelliteError} result of the operation.
     */
    public void abortSendingSatelliteDatagrams(@NonNull IIntegerConsumer resultCallback){
        // stub implementation
    }
}
+14 −3
Original line number Diff line number Diff line
@@ -3046,13 +3046,24 @@ interface ITelephony {
    boolean setSatellitePointingUiClassName(in String packageName, in String className);

    /**
     * This API can be used by only CTS to update the timeout duration in milliseconds whether
     * the device is aligned with the satellite for demo mode
     * This API can be used by only CTS to override the timeout durations used by the
     * DatagramController module.
     *
     * @param timeoutMillis The timeout duration in millisecond.
     * @return {@code true} if the timeout duration is set successfully, {@code false} otherwise.
     */
    boolean setSatelliteDeviceAlignedTimeoutDuration(long timeoutMillis);
    boolean setDatagramControllerTimeoutDuration(
            boolean reset, int timeoutType, long timeoutMillis);

    /**
     * This API can be used by only CTS to override the timeout durations used by the
     * SatelliteController module.
     *
     * @param timeoutMillis The timeout duration in millisecond.
     * @return {@code true} if the timeout duration is set successfully, {@code false} otherwise.
     */
    boolean setSatelliteControllerTimeoutDuration(
            boolean reset, int timeoutType, long timeoutMillis);

    /**
     * This API can be used in only testing to override connectivity status in monitoring emergency