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

Commit 1b958682 authored by Sarah Chin's avatar Sarah Chin
Browse files

Add support for satellite service APIs

Test: atest SatelliteManagerTest
Bug: 262819557
Change-Id: Ide465406773ac58cb532445f5f5f81f9649dc3c4
parent 8d36657a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3049,6 +3049,13 @@ public interface CommandsInterface {
     */
    default void getSatellitePowerState(Message result) {}

    /**
     * Check whether satellite modem is supported by the device.
     *
     * @param result Message that will be sent back to the requester
     */
    default void isSatelliteSupported(Message result) {}

    /**
     * Provision the subscription with a satellite provider. This is needed to register the
     * subscription if the provider allows dynamic registration.
+33 −0
Original line number Diff line number Diff line
@@ -5272,6 +5272,39 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mCi.getMaxCharactersPerSatelliteTextMessage(result);
    }

    /**
     * Power on or off the satellite modem.
     * @param result The Message to send the result of the operation to.
     * @param powerOn {@code true} to power on the satellite modem and {@code false} to power off.
     */
    public void setSatellitePower(Message result, boolean powerOn) {
        mCi.setSatellitePower(result, powerOn);
    }

    /**
     * Check whether the satellite modem is powered on.
     * @param result The Message to send the result of the operation to.
     */
    public void isSatellitePowerOn(Message result) {
        mCi.getSatellitePowerState(result);
    }

    /**
     * Check whether the satellite service is supported on the device.
     * @param result The Message to send the result of the operation to.
     */
    public void isSatelliteSupported(Message result) {
        mCi.isSatelliteSupported(result);
    }

    /**
     * Get the satellite capabilities.
     * @param result The Message to send the result of the operation to.
     */
    public void getSatelliteCapabilities(Message result) {
        mCi.getSatelliteCapabilities(result);
    }

    /**
     * Registers for pointing info changed from satellite modem.
     *
+14 −0
Original line number Diff line number Diff line
@@ -6154,6 +6154,20 @@ public class RIL extends BaseCommands implements CommandsInterface {
        }
    }

    /**
     * Check whether satellite modem is supported by the device.
     *
     * @param result Message that will be sent back to the requester.
     */
    @Override
    public void isSatelliteSupported(Message result) {
        if (result != null) {
            AsyncResult.forMessage(result, null,
                    CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
            result.sendToTarget();
        }
    }

    /**
     * User started pointing to the satellite. Modem should continue to update the ponting input
     * as user moves device.