Add a Registration Failure indication to IRadio
Add an indication to IRadio that is fired whenever
a cellular registration failure occurs.
Bug: 143187065
Test: atest VtsHalRadioV1_5TargetTest
Merged-In: I7765a7491f807a08272b9bc8923ae9377ff3b9d1
Change-Id: I7765a7491f807a08272b9bc8923ae9377ff3b9d1
(cherry picked from commit 13834c4a796c665668deaec8af957349d1a8a82b)
diff --git a/radio/1.5/IRadioIndication.hal b/radio/1.5/IRadioIndication.hal
index 81452ab..879e9ad 100644
--- a/radio/1.5/IRadioIndication.hal
+++ b/radio/1.5/IRadioIndication.hal
@@ -30,4 +30,33 @@
* @param enabled whether uiccApplications are enabled, or disabled
*/
oneway uiccApplicationsEnablementChanged(RadioIndicationType type, bool enabled);
+
+ /**
+ * Report that Registration or a Location/Routing/Tracking Area update has failed.
+ *
+ * <p>Indicate whenever a registration procedure, including a location, routing, or tracking
+ * area update fails. This includes procedures that do not necessarily result in a change of
+ * the modem's registration status. If the modem's registration status changes, that is
+ * reflected in the onNetworkStateChanged() and subsequent get{Voice/Data}RegistrationState().
+ *
+ * @param cellIdentity the CellIdentity, which must include the globally unique identifier for
+ * the cell (for example, all components of the CGI or ECGI).
+ * @param chosenPlmn a 5 or 6 digit alphanumeric PLMN (MCC|MNC) among those broadcast by the
+ * cell that was chosen for the failed registration attempt.
+ * @param domain Domain::CS, Domain::PS, or both in case of a combined procedure.
+ * @param causeCode the primary failure cause code of the procedure.
+ * For GSM/UMTS (MM), values are in TS 24.008 Sec 10.5.95
+ * For GSM/UMTS (GMM), values are in TS 24.008 Sec 10.5.147
+ * For LTE (EMM), cause codes are TS 24.301 Sec 9.9.3.9
+ * For NR (5GMM), cause codes are TS 24.501 Sec 9.11.3.2
+ * MAX_INT if this value is unused.
+ * @param additionalCauseCode the cause code of any secondary/combined procedure if appropriate.
+ * For UMTS, if a combined attach succeeds for PS only, then the GMM cause code shall be
+ * included as an additionalCauseCode.
+ * For LTE (ESM), cause codes are in TS 24.301 9.9.4.4
+ * MAX_INT if this value is unused.
+ */
+ oneway registrationFailed(
+ RadioIndicationType type, CellIdentity cellIdentity, string chosenPlmn,
+ bitfield<Domain> domain, int32_t causeCode, int32_t additionalCauseCode);
};
diff --git a/radio/1.5/types.hal b/radio/1.5/types.hal
index 3c6e67a..2a2ba11 100644
--- a/radio/1.5/types.hal
+++ b/radio/1.5/types.hal
@@ -22,14 +22,22 @@
import @1.1::RadioAccessSpecifier;
import @1.1::ScanType;
import @1.1::UtranBands;
+import @1.2::CellIdentityCdma;
+import @1.2::CellIdentityGsm;
+import @1.2::CellIdentityWcdma;
+import @1.2::CellIdentityTdscdma;
+import @1.2::CellIdentityLte;
import @1.2::NetworkScanRequest;
import @1.4::AccessNetwork;
import @1.4::ApnTypes;
+import @1.4::CellIdentityNr;
import @1.4::DataCallFailCause;
import @1.4::DataConnActiveStatus;
import @1.4::DataProfileInfo;
import @1.4::PdpProtocolType;
+import android.hidl.safe_union@1.0::Monostate;
+
/**
* Defining signal strength type.
*/
@@ -394,3 +402,22 @@
int32_t mtu;
};
+enum Domain : int32_t {
+ /** Circuit-switched */
+ CS = 1 << 0,
+
+ /** Packet-switched */
+ PS = 1 << 1,
+};
+
+/** A union representing the CellIdentity of a single cell */
+safe_union CellIdentity {
+ Monostate noinit;
+
+ CellIdentityGsm gsm;
+ CellIdentityWcdma wcdma;
+ CellIdentityTdscdma tdscdma;
+ CellIdentityCdma cdma;
+ CellIdentityLte lte;
+ CellIdentityNr nr;
+};
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
index ba11257..49a315d 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
+++ b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
@@ -739,6 +739,13 @@
Return<void> modemReset(RadioIndicationType type,
const ::android::hardware::hidl_string& reason);
+
+ Return<void> registrationFailed(
+ RadioIndicationType type,
+ const ::android::hardware::radio::V1_5::CellIdentity& cellIdentity,
+ const ::android::hardware::hidl_string& chosenPlmn,
+ ::android::hardware::hidl_bitfield<::android::hardware::radio::V1_5::Domain> domain,
+ int32_t causeCode, int32_t additionalCauseCode);
};
// Test environment for Radio HIDL HAL.
diff --git a/radio/1.5/vts/functional/radio_indication.cpp b/radio/1.5/vts/functional/radio_indication.cpp
index acffbbe..2416605 100644
--- a/radio/1.5/vts/functional/radio_indication.cpp
+++ b/radio/1.5/vts/functional/radio_indication.cpp
@@ -333,3 +333,12 @@
bool /*enabled*/) {
return Void();
}
+
+Return<void> RadioIndication_v1_5::registrationFailed(
+ RadioIndicationType /*type*/,
+ const ::android::hardware::radio::V1_5::CellIdentity& /*cellIdentity*/,
+ const ::android::hardware::hidl_string& /*chosenPlmn*/,
+ ::android::hardware::hidl_bitfield<::android::hardware::radio::V1_5::Domain> /*domain*/,
+ int32_t /*causeCode*/, int32_t /*additionalCauseCode*/) {
+ return Void();
+}