From 13834c4a796c665668deaec8af957349d1a8a82b Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Wed, 11 Dec 2019 11:00:49 -0800 Subject: [PATCH] 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 Change-Id: I7765a7491f807a08272b9bc8923ae9377ff3b9d1 --- current.txt | 4 +-- radio/1.5/IRadioIndication.hal | 29 +++++++++++++++++++ radio/1.5/types.hal | 27 +++++++++++++++++ .../functional/radio_hidl_hal_utils_v1_5.h | 7 +++++ radio/1.5/vts/functional/radio_indication.cpp | 9 ++++++ 5 files changed, 74 insertions(+), 2 deletions(-) diff --git a/current.txt b/current.txt index 0345ce0cf6..921a103f68 100644 --- a/current.txt +++ b/current.txt @@ -657,9 +657,9 @@ c72cb37b3f66ef65aeb5c6438a3fbe17bbe847fdf62d1a76eafd7f3a8a526105 android.hardwar 342a8e12db4dca643f2755eb4167e8f103d96502053a25a1f51f42107a4530f1 android.hardware.wifi.supplicant@1.3::ISupplicantStaIfaceCallback 5477f8bafb29548875622fa83f1c0a29cee641acee613315eb747731001f4aff android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork 91015479f5a0fba9872e98d3cca4680995de64f42ae71461b4b7e5acc5a196ab android.hardware.wifi.supplicant@1.3::types -c4026d6db206c880a69c9a90404b7298c564e3d946449a952a5a1581742a6d8f android.hardware.radio@1.5::types +d9044563a5ac5a17a239303b8dec1e51167761ac46e965f61e31654cc034d31b android.hardware.radio@1.5::types afa2d6cf4c0ba4b8482d5bcc097594ad5bc49be0bf3003034f75955cdaf66045 android.hardware.radio@1.5::IRadio -3afac66f21a33bc9c4b80481c7d5540038348651d9a7d8af64ea13610af138da android.hardware.radio@1.5::IRadioIndication +bc59237dbd93949238081f762710552e76670cb648c0e198138551460ac54b1e android.hardware.radio@1.5::IRadioIndication f4888f9676890b43a459c6380f335fea7a6ad32ed3bafafeb018a88d6c0be8a4 android.hardware.radio@1.5::IRadioResponse 55f0a15642869ec98a55ea0a5ac049d3e1a6245ff7750deb6bcb7182057eee83 android.hardware.radio.config@1.3::types b27ab0cd40b0b078cdcd024bfe1061c4c4c065f3519eeb9347fa359a3268a5ae android.hardware.radio.config@1.3::IRadioConfig diff --git a/radio/1.5/IRadioIndication.hal b/radio/1.5/IRadioIndication.hal index 81452abb13..879e9addf4 100644 --- a/radio/1.5/IRadioIndication.hal +++ b/radio/1.5/IRadioIndication.hal @@ -30,4 +30,33 @@ interface IRadioIndication extends @1.4::IRadioIndication { * @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. + * + *

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, int32_t causeCode, int32_t additionalCauseCode); }; diff --git a/radio/1.5/types.hal b/radio/1.5/types.hal index a34f5e63a8..7d6ec417de 100644 --- a/radio/1.5/types.hal +++ b/radio/1.5/types.hal @@ -22,14 +22,22 @@ import @1.1::RadioAccessNetworks; 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. */ @@ -397,3 +405,22 @@ struct SetupDataCallResult { 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 ba1125767b..49a315d838 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 @@ class RadioIndication_v1_5 : public ::android::hardware::radio::V1_5::IRadioIndi Return modemReset(RadioIndicationType type, const ::android::hardware::hidl_string& reason); + + Return 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 acffbbea3d..2416605447 100644 --- a/radio/1.5/vts/functional/radio_indication.cpp +++ b/radio/1.5/vts/functional/radio_indication.cpp @@ -333,3 +333,12 @@ Return RadioIndication_v1_5::uiccApplicationsEnablementChanged(RadioIndica bool /*enabled*/) { return Void(); } + +Return 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(); +}