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

Commit 2ebe9f86 authored by Sarah Chin's avatar Sarah Chin Committed by Android (Google) Code Review
Browse files

Merge "Add support for satellite service APIs"

parents 112a2e60 1b958682
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -3049,6 +3049,13 @@ public interface CommandsInterface {
     */
     */
    default void getSatellitePowerState(Message result) {}
    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
     * Provision the subscription with a satellite provider. This is needed to register the
     * subscription if the provider allows dynamic registration.
     * subscription if the provider allows dynamic registration.
+33 −0
Original line number Original line Diff line number Diff line
@@ -5279,6 +5279,39 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mCi.getMaxCharactersPerSatelliteTextMessage(result);
        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.
     * Registers for pointing info changed from satellite modem.
     *
     *
+14 −0
Original line number Original line 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
     * User started pointing to the satellite. Modem should continue to update the ponting input
     * as user moves device.
     * as user moves device.