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

Commit 9eac48c7 authored by Hyosun Kim's avatar Hyosun Kim
Browse files

Add onRegistrationFailure api

Bug: 365634513
Test: atest SatelliteControllerTest
Flag: com.android.internal.telephony.flags.carrier_roaming_nb_iot_ntn

Change-Id: Iadf02c42747c14789d87c32e0d6fb563996336b2
parent 4cc911dd
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;
@@ -1573,6 +1574,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) {};
}