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

Commit 73c4daea authored by Sarah Chin's avatar Sarah Chin
Browse files

Update API surface to handle satellite service indications

Test: atest SatelliteManagerTest
Bug: 261131816
Change-Id: Id3989bec9576c120d5356cce431f7a7037d54c4f
parent 14cc6847
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,10 +25,10 @@ import android.telephony.satellite.SatelliteDatagram;
 */
oneway interface ISatelliteDatagramCallback {
    /**
     * Called when datagrams are received from satellite.
     * Called when there is an incoming datagram to be received from satellite.
     *
     * @param datagramId An id that uniquely identifies incoming datagram.
     * @param datagram datagram received from satellite.
     * @param datagram Datagram received from satellite.
     * @param pendingCount Number of datagrams yet to be received from satellite.
     * @param callback This callback will be used by datagram receiver app to send ack back to
     *                 Telephony. If the callback is not received within five minutes,
+4 −4
Original line number Diff line number Diff line
@@ -24,20 +24,20 @@ import android.telephony.satellite.PointingInfo;
 */
oneway interface ISatellitePositionUpdateCallback {
    /**
     * Called when satellite datagram transfer state changes.
     * Called when satellite datagram transfer state changed.
     *
     * @param state The new datagram transfer state.
     * @param sendPendingCount The number of datagrams that are currently being sent.
     * @param receivePendingCount The number of datagrams that are currently being received.
     * @param errorCode If datagram transfer failed, the reason for failure.
     */
    void onDatagramTransferStateUpdate(in int state, in int sendPendingCount,
    void onDatagramTransferStateChanged(in int state, in int sendPendingCount,
            in int receivePendingCount, in int errorCode);

    /**
     * Called when the satellite position changes.
     * Called when the satellite position changed.
     *
     * @param pointingInfo The pointing info containing the satellite location.
     */
    void onSatellitePositionUpdate(in PointingInfo pointingInfo);
    void onSatellitePositionChanged(in PointingInfo pointingInfo);
}
+1 −1
Original line number Diff line number Diff line
@@ -33,5 +33,5 @@ oneway interface ISatelliteStateCallback {
     *
     * @param state The current satellite modem state.
     */
    void onSatelliteModemStateChange(in int state);
    void onSatelliteModemStateChanged(in int state);
}
+3 −3
Original line number Diff line number Diff line
@@ -48,10 +48,10 @@ public final class PointingInfo implements Parcelable {
    /**
     * @hide
     */
    public PointingInfo(float satelliteAzimuthDegress, float satelliteElevationDegress,
    public PointingInfo(float satelliteAzimuthDegrees, float satelliteElevationDegrees,
            float antennaAzimuthDegrees, float antennaPitchDegrees, float antennaRollDegrees) {
        mSatelliteAzimuthDegrees = satelliteAzimuthDegress;
        mSatelliteElevationDegrees = satelliteElevationDegress;
        mSatelliteAzimuthDegrees = satelliteAzimuthDegrees;
        mSatelliteElevationDegrees = satelliteElevationDegrees;
        mAntennaAzimuthDegrees = antennaAzimuthDegrees;
        mAntennaPitchDegrees = antennaPitchDegrees;
        mAntennaRollDegrees = antennaRollDegrees;
+5 −3
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ public final class SatelliteCapabilities implements Parcelable {
    /**
     * List of technologies supported by the satellite modem.
     */
    private Set<Integer> mSupportedRadioTechnologies;
    @NonNull @SatelliteManager.NTRadioTechnology private Set<Integer> mSupportedRadioTechnologies;

    /**
     * Whether satellite modem is always on.
@@ -53,7 +53,8 @@ public final class SatelliteCapabilities implements Parcelable {
     */
    public SatelliteCapabilities(Set<Integer> supportedRadioTechnologies, boolean isAlwaysOn,
            boolean needsPointingToSatellite, boolean needsSeparateSimProfile) {
        mSupportedRadioTechnologies = supportedRadioTechnologies;
        mSupportedRadioTechnologies = supportedRadioTechnologies == null
                ? new HashSet<>() : supportedRadioTechnologies;
        mIsAlwaysOn = isAlwaysOn;
        mNeedsPointingToSatellite = needsPointingToSatellite;
        mNeedsSeparateSimProfile = needsSeparateSimProfile;
@@ -126,7 +127,8 @@ public final class SatelliteCapabilities implements Parcelable {
    /**
     * @return The list of technologies supported by the satellite modem.
     */
    @NonNull public Set<Integer> getSupportedRadioTechnologies() {
    @NonNull @SatelliteManager.NTRadioTechnology public Set<Integer>
            getSupportedRadioTechnologies() {
        return mSupportedRadioTechnologies;
    }

Loading