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

Commit 6b43ee65 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add onRegistrationFailure api" into main

parents cc8e8c9a 9eac48c7
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -34,4 +34,12 @@ oneway interface ISatelliteModemStateCallback {
     * @param isEmergency True means satellite enabled for emergency mode, false otherwise.
     */
    void onEmergencyModeChanged(in boolean isEmergency);

    /**
     * Indicates that the satellite registration failed with following failure code
     *
     * @param causeCode the primary failure cause code of the procedure.
     *                  For LTE (EMM), cause codes are TS 24.301 Sec 9.9.3.9
     */
    void onRegistrationFailure(in int causeCode);
}
+8 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package android.telephony.satellite;
import android.Manifest;
import android.annotation.CallbackExecutor;
import android.annotation.FlaggedApi;
import android.annotation.Hide;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -1579,6 +1580,13 @@ public final class SatelliteManager {
                        executor.execute(() -> Binder.withCleanCallingIdentity(() ->
                                callback.onEmergencyModeChanged(isEmergency)));
                    }

                    @Hide
                    @Override
                    public void onRegistrationFailure(int causeCode) {
                        executor.execute(() -> Binder.withCleanCallingIdentity(() ->
                                callback.onRegistrationFailure(causeCode)));
                    }
                };
                sSatelliteModemStateCallbackMap.put(callback, internalCallback);
                return telephony.registerForSatelliteModemStateChanged(internalCallback);
+9 −0
Original line number Diff line number Diff line
@@ -45,4 +45,13 @@ public interface SatelliteModemStateCallback {
     */
    @FlaggedApi(Flags.FLAG_CARRIER_ROAMING_NB_IOT_NTN)
    default void onEmergencyModeChanged(boolean isEmergency) {};

    /**
     * Indicates that the satellite registration failed with following failure code
     *
     * @param causeCode the primary failure cause code of the procedure.
     *                  For LTE (EMM), cause codes are TS 24.301 Sec 9.9.3.9
     * @hide
     */
    default void onRegistrationFailure(int causeCode) {};
}