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

Commit 777102ee authored by Ling Ma's avatar Ling Ma
Browse files

Enable modem with SatelliteModemEnableRequestAttributes

Wrap parameters that are used for requestSatelliteEnabled.

- Wrap icc id and apn name into a new class SatelliteSubscriptionInfo,
which represents the info needed by modem for satellite
provision/attachment.
- Wrap SatelliteSubscriptionInfo along with mIsEnabled, mIsDemoMode,
  mIsEmergencyMode when requestSatelliteEnabled

Bug: 350387637
Test: integration test to provision and attach to skylo
Flag: com.android.internal.telephony.flags.carrier_roaming_nb_iot_ntn
Change-Id: Id4a4b6c5e78abe45ad417fca1feb47f14bbcd2cc
parent 30394c2c
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.telephony.satellite.stub.ISatelliteCapabilitiesConsumer;
import android.telephony.satellite.stub.ISatelliteListener;
import android.telephony.satellite.stub.SatelliteDatagram;
import android.telephony.satellite.stub.SystemSelectionSpecifier;
import android.telephony.satellite.stub.SatelliteModemEnableRequestAttributes;

/**
 * {@hide}
@@ -82,12 +83,7 @@ oneway interface ISatellite {
     * is enabled, this may also disable the cellular modem, and if the satellite modem is disabled,
     * this may also re-enable the cellular modem.
     *
     * @param enableSatellite True to enable the satellite modem and false to disable.
     * @param enableDemoMode True to enable demo mode and false to disable.
     * @param isEmergency To specify the satellite is enabled for emergency session and false for
     * non emergency session. Note: it is possible that a emergency session started get converted
     * to a non emergency session and vice versa.
     * @param resultCallback The callback to receive the error code result of the operation.
     * @param enableAttributes The enable parameters that will be applied to the satellite session
     *
     * Valid result codes returned:
     *   SatelliteResult:SATELLITE_RESULT_SUCCESS
@@ -99,8 +95,8 @@ oneway interface ISatellite {
     *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
     *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
     */
    void requestSatelliteEnabled(in boolean enableSatellite, in boolean enableDemoMode,
            in boolean isEmergency, in IIntegerConsumer resultCallback);
    void requestSatelliteEnabled(in SatelliteModemEnableRequestAttributes enableAttributes,
            in IIntegerConsumer resultCallback);

    /**
     * Request to get whether the satellite modem is enabled.
+6 −11
Original line number Diff line number Diff line
@@ -89,12 +89,11 @@ public class SatelliteImplBase extends SatelliteService {
        }

        @Override
        public void requestSatelliteEnabled(boolean enableSatellite, boolean enableDemoMode,
                boolean isEmergency, IIntegerConsumer resultCallback) throws RemoteException {
        public void requestSatelliteEnabled(SatelliteModemEnableRequestAttributes enableAttributes,
                IIntegerConsumer resultCallback) throws RemoteException {
            executeMethodAsync(
                    () -> SatelliteImplBase.this
                            .requestSatelliteEnabled(
                                    enableSatellite, enableDemoMode, isEmergency, resultCallback),
                            .requestSatelliteEnabled(enableAttributes, resultCallback),
                    "requestSatelliteEnabled");
        }

@@ -325,11 +324,7 @@ public class SatelliteImplBase extends SatelliteService {
     * enabled, this may also disable the cellular modem, and if the satellite modem is disabled,
     * this may also re-enable the cellular modem.
     *
     * @param enableSatellite True to enable the satellite modem and false to disable.
     * @param enableDemoMode True to enable demo mode and false to disable.
     * @param isEmergency To specify the satellite is enabled for emergency session and false for
     * non emergency session. Note: it is possible that a emergency session started get converted
     * to a non emergency session and vice versa.
     * @param enableAttributes The enable parameters that will be applied to the satellite session
     * @param resultCallback The callback to receive the error code result of the operation.
     *
     * Valid result codes returned:
@@ -342,8 +337,8 @@ public class SatelliteImplBase extends SatelliteService {
     *   SatelliteResult:SATELLITE_RESULT_REQUEST_NOT_SUPPORTED
     *   SatelliteResult:SATELLITE_RESULT_NO_RESOURCES
     */
    public void requestSatelliteEnabled(boolean enableSatellite, boolean enableDemoMode,
            boolean isEmergency, @NonNull IIntegerConsumer resultCallback) {
    public void requestSatelliteEnabled(SatelliteModemEnableRequestAttributes enableAttributes,
            @NonNull IIntegerConsumer resultCallback) {
        // stub implementation
    }