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

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

Merge "Add the new API onSendDatagramRequested" into main

parents a61bb061 9a9f3de9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -50,4 +50,11 @@ oneway interface ISatelliteTransmissionUpdateCallback {
     *                     Satellite location is based on magnetic north direction.
     */
    void onSatellitePositionChanged(in PointingInfo pointingInfo);

    /**
     * Called when framework receives a request to send a datagram.
     *
     * @param datagramType The type of the requested datagram.
     */
    void onSendDatagramRequested(int datagramType);
}
+6 −0
Original line number Diff line number Diff line
@@ -1220,6 +1220,12 @@ public final class SatelliteManager {
                                        () -> callback.onReceiveDatagramStateChanged(
                                                state, receivePendingCount, errorCode)));
                            }

                            @Override
                            public void onSendDatagramRequested(int datagramType) {
                                executor.execute(() -> Binder.withCleanCallingIdentity(
                                        () -> callback.onSendDatagramRequested(datagramType)));
                            }
                        };
                sSatelliteTransmissionUpdateCallbackMap.put(callback, internalCallback);
                telephony.startSatelliteTransmissionUpdates(errorCallback, internalCallback);
+9 −0
Original line number Diff line number Diff line
@@ -75,4 +75,13 @@ public interface SatelliteTransmissionUpdateCallback {
    void onReceiveDatagramStateChanged(
            @SatelliteManager.SatelliteDatagramTransferState int state, int receivePendingCount,
            @SatelliteManager.SatelliteResult int errorCode);

    /**
     * Called when framework receives a request to send a datagram.
     *
     * @param datagramType The type of the requested datagram.
     *
     * @hide
     */
    default void onSendDatagramRequested(@SatelliteManager.DatagramType int datagramType) {}
}