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

Commit 9a9f3de9 authored by Thomas Nguyen's avatar Thomas Nguyen
Browse files

Add the new API onSendDatagramRequested

Flag: EXEMPT bugfix
Bug: 358232021
Test: Manually test with updated scone.apk
SatelliteManagerTestOnMockService

Change-Id: I9fd32c85d145326af7ed47a7b5991fec67483437
parent 7df847de
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) {}
}