diff options
| author | 2024-09-10 11:04:38 +0000 | |
|---|---|---|
| committer | 2024-09-13 05:19:32 +0000 | |
| commit | 9eac48c72fe80370a18683e70db7116caf274eb8 (patch) | |
| tree | e8c428a95fc6c8ef364d494b2163ff712f2abef7 | |
| parent | 4cc911dd5c1dae6ea644361791e0545f274ce2cf (diff) | |
Add onRegistrationFailure api
Bug: 365634513
Test: atest SatelliteControllerTest
Flag: com.android.internal.telephony.flags.carrier_roaming_nb_iot_ntn
Change-Id: Iadf02c42747c14789d87c32e0d6fb563996336b2
3 files changed, 25 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/satellite/ISatelliteModemStateCallback.aidl b/telephony/java/android/telephony/satellite/ISatelliteModemStateCallback.aidl index 66a20ae28f39..50e3a0e4a79d 100644 --- a/telephony/java/android/telephony/satellite/ISatelliteModemStateCallback.aidl +++ b/telephony/java/android/telephony/satellite/ISatelliteModemStateCallback.aidl @@ -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); } diff --git a/telephony/java/android/telephony/satellite/SatelliteManager.java b/telephony/java/android/telephony/satellite/SatelliteManager.java index 284e2bd8aa6c..d5ee2c0809f5 100644 --- a/telephony/java/android/telephony/satellite/SatelliteManager.java +++ b/telephony/java/android/telephony/satellite/SatelliteManager.java @@ -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); diff --git a/telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java b/telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java index 423a7859dd6b..13af4694389b 100644 --- a/telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java +++ b/telephony/java/android/telephony/satellite/SatelliteModemStateCallback.java @@ -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) {}; } |