Radio HAL : Support N3IWF

Introduce a new RadioTechnologyFamily type (NON_3GPP)
Include Radio tech family in RegStateResult to differentiate NR & N3IWF.
Add getRegistrationState to differentiate response between NR &
N3IWF.
Add unthrottleDataProfile to differentiate unthrottle event between NR & N3IWF

Bug: 249129495
Test: update-api, Android build, atest VtsHalRadioTargetTest
Change-Id: I8b4b055be140afd26b453fa8d50c999ad4c19bec
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index a20d15d..98b3fca 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -461,7 +461,7 @@
     </hal>
     <hal format="aidl" optional="true">
         <name>android.hardware.radio.data</name>
-        <version>1</version>
+        <version>2</version>
         <interface>
             <name>IRadioData</name>
             <instance>slot1</instance>
diff --git a/radio/aidl/Android.bp b/radio/aidl/Android.bp
index 613f31b..01d70cd 100644
--- a/radio/aidl/Android.bp
+++ b/radio/aidl/Android.bp
@@ -36,7 +36,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/config/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V1"],
+    imports: ["android.hardware.radio-V2"],
     backend: {
         cpp: {
             enabled: true,
@@ -48,7 +48,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: ["android.hardware.radio-V1"],
+            imports: ["android.hardware.radio-V2"],
         },
     ],
 
@@ -60,7 +60,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/data/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V1"],
+    imports: ["android.hardware.radio-V2"],
     backend: {
         cpp: {
             enabled: true,
@@ -72,7 +72,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: ["android.hardware.radio-V1"],
+            imports: ["android.hardware.radio-V2"],
         },
     ],
 
@@ -84,7 +84,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/messaging/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V1"],
+    imports: ["android.hardware.radio-V2"],
     backend: {
         cpp: {
             enabled: true,
@@ -96,7 +96,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: ["android.hardware.radio-V1"],
+            imports: ["android.hardware.radio-V2"],
         },
     ],
 
@@ -108,7 +108,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/modem/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V1"],
+    imports: ["android.hardware.radio-V2"],
     backend: {
         cpp: {
             enabled: true,
@@ -120,7 +120,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: ["android.hardware.radio-V1"],
+            imports: ["android.hardware.radio-V2"],
         },
     ],
 
@@ -132,7 +132,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/network/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V1"],
+    imports: ["android.hardware.radio-V2"],
     backend: {
         cpp: {
             enabled: true,
@@ -144,7 +144,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: ["android.hardware.radio-V1"],
+            imports: ["android.hardware.radio-V2"],
         },
     ],
 
@@ -157,7 +157,7 @@
     srcs: ["android/hardware/radio/sim/*.aidl"],
     stability: "vintf",
     imports: [
-        "android.hardware.radio-V1",
+        "android.hardware.radio-V2",
         "android.hardware.radio.config",
     ],
     backend: {
@@ -172,7 +172,7 @@
         {
             version: "1",
             imports: [
-                "android.hardware.radio-V1",
+                "android.hardware.radio-V2",
                 "android.hardware.radio.config-V1",
             ],
         },
@@ -186,7 +186,7 @@
     host_supported: true,
     srcs: ["android/hardware/radio/voice/*.aidl"],
     stability: "vintf",
-    imports: ["android.hardware.radio-V1"],
+    imports: ["android.hardware.radio-V2"],
     backend: {
         cpp: {
             enabled: true,
@@ -198,7 +198,7 @@
     versions_with_info: [
         {
             version: "1",
-            imports: ["android.hardware.radio-V1"],
+            imports: ["android.hardware.radio-V2"],
         },
     ],
 
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl
index 0ffa1f7..5983afe 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/IRadioDataIndication.aidl
@@ -37,6 +37,10 @@
   oneway void dataCallListChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.SetupDataCallResult[] dcList);
   oneway void keepaliveStatus(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.KeepaliveStatus status);
   oneway void pcoData(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.PcoDataInfo pco);
+  /**
+   * @deprecated use unthrottleDataProfile to clarify access network for this event.
+   */
   oneway void unthrottleApn(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.DataProfileInfo dataProfileInfo);
   oneway void slicingConfigChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.data.SlicingConfig slicingConfig);
+  oneway void unthrottleDataProfile(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.AccessNetwork accessNetwork, in android.hardware.radio.data.DataProfileInfo dataProfileInfo);
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
index 832738f..3b0c5e0 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
@@ -40,6 +40,9 @@
   oneway void getBarringInfo(in int serial);
   oneway void getCdmaRoamingPreference(in int serial);
   oneway void getCellInfoList(in int serial);
+  /**
+   * @deprecated use getRegistrationState()
+   */
   oneway void getDataRegistrationState(in int serial);
   oneway void getImsRegistrationState(in int serial);
   oneway void getNetworkSelectionMode(in int serial);
@@ -47,6 +50,9 @@
   oneway void getSignalStrength(in int serial);
   oneway void getSystemSelectionChannels(in int serial);
   oneway void getVoiceRadioTechnology(in int serial);
+  /**
+   * @deprecated use getRegistrationState()
+   */
   oneway void getVoiceRegistrationState(in int serial);
   oneway void isNrDualConnectivityEnabled(in int serial);
   oneway void responseAcknowledgement();
@@ -74,4 +80,5 @@
   oneway void triggerEmergencyNetworkScan(int serial, in android.hardware.radio.network.EmergencyNetworkScanTrigger request);
   oneway void cancelEmergencyNetworkScan(in int serial);
   oneway void exitEmergencyMode(in int serial);
+  oneway void getRegistrationState(in int serial, in android.hardware.radio.RadioTechnologyFamily ratFamily, in android.hardware.radio.network.Domain domain);
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 24d587e..228451f 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -41,6 +41,9 @@
   oneway void getBarringInfoResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.CellIdentity cellIdentity, in android.hardware.radio.network.BarringInfo[] barringInfos);
   oneway void getCdmaRoamingPreferenceResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.CdmaRoamingType type);
   oneway void getCellInfoListResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.CellInfo[] cellInfo);
+  /**
+   * @deprecated use getRegistrationStateResponse()
+   */
   oneway void getDataRegistrationStateResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.RegStateResult dataRegResponse);
   oneway void getImsRegistrationStateResponse(in android.hardware.radio.RadioResponseInfo info, in boolean isRegistered, in android.hardware.radio.RadioTechnologyFamily ratFamily);
   oneway void getNetworkSelectionModeResponse(in android.hardware.radio.RadioResponseInfo info, in boolean manual);
@@ -48,6 +51,9 @@
   oneway void getSignalStrengthResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.SignalStrength signalStrength);
   oneway void getSystemSelectionChannelsResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.RadioAccessSpecifier[] specifiers);
   oneway void getVoiceRadioTechnologyResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.RadioTechnology rat);
+  /**
+   * @deprecated use getRegistrationStateResponse()
+   */
   oneway void getVoiceRegistrationStateResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.RegStateResult voiceRegResponse);
   oneway void isNrDualConnectivityEnabledResponse(in android.hardware.radio.RadioResponseInfo info, in boolean isEnabled);
   oneway void setAllowedNetworkTypesBitmapResponse(in android.hardware.radio.RadioResponseInfo info);
@@ -73,4 +79,5 @@
   oneway void triggerEmergencyNetworkScanResponse(in android.hardware.radio.RadioResponseInfo info);
   oneway void exitEmergencyModeResponse(in android.hardware.radio.RadioResponseInfo info);
   oneway void cancelEmergencyNetworkScanResponse(in android.hardware.radio.RadioResponseInfo info);
+  oneway void getRegistrationStateResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.network.RegStateResult regResponse);
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
index e5a0a70..0b2d733 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/NrVopsInfo.aidl
@@ -41,6 +41,7 @@
   const byte EMC_INDICATOR_NR_CONNECTED_TO_5GCN = 1;
   const byte EMC_INDICATOR_EUTRA_CONNECTED_TO_5GCN = 2;
   const byte EMC_INDICATOR_BOTH_NR_EUTRA_CONNECTED_TO_5GCN = 3;
+  const byte EMC_INDICATOR_EMC_OVER_NON_3GPP = 4;
   const byte EMF_INDICATOR_NOT_SUPPORTED = 0;
   const byte EMF_INDICATOR_NR_CONNECTED_TO_5GCN = 1;
   const byte EMF_INDICATOR_EUTRA_CONNECTED_TO_5GCN = 2;
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
index f0a03ae..c1e5c8d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/RegStateResult.aidl
@@ -40,4 +40,5 @@
   android.hardware.radio.network.CellIdentity cellIdentity;
   String registeredPlmn;
   android.hardware.radio.network.AccessTechnologySpecificInfo accessTechnologySpecificInfo;
+  android.hardware.radio.AccessNetwork accessNetwork = android.hardware.radio.AccessNetwork.UNKNOWN;
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/AccessNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/AccessNetwork.aidl
index 8ce689f..4a53a6d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/AccessNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/AccessNetwork.aidl
@@ -39,6 +39,11 @@
   UTRAN = 2,
   EUTRAN = 3,
   CDMA2000 = 4,
+  /**
+   * @deprecated should use N3ANEPS or N3AN5GS based on N3AN selection.
+   */
   IWLAN = 5,
   NGRAN = 6,
+  N3ANEPS = 5,
+  N3AN5GS = 7,
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnologyFamily.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnologyFamily.aidl
index e6fdce2..5a8f403 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnologyFamily.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnologyFamily.aidl
@@ -36,4 +36,5 @@
 enum RadioTechnologyFamily {
   THREE_GPP = 0,
   THREE_GPP2 = 1,
+  NON_3GPP = 2,
 }
diff --git a/radio/aidl/android/hardware/radio/AccessNetwork.aidl b/radio/aidl/android/hardware/radio/AccessNetwork.aidl
index 2885642..b85143d 100644
--- a/radio/aidl/android/hardware/radio/AccessNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/AccessNetwork.aidl
@@ -23,30 +23,39 @@
     /**
      * Unknown access network
      */
-    UNKNOWN,
+    UNKNOWN = 0,
     /**
      * GSM EDGE Radio Access Network
      */
-    GERAN,
+    GERAN = 1,
     /**
      * Universal Terrestrial Radio Access Network
      */
-    UTRAN,
+    UTRAN = 2,
     /**
      * Evolved Universal Terrestrial Radio Access Network
      */
-    EUTRAN,
+    EUTRAN = 3,
     /**
      * CDMA 2000 network
      */
-    CDMA2000,
+    CDMA2000 = 4,
     /**
-     * Interworking Wireless LAN
+     * Interworking Wireless LAN.
+     * @deprecated should use N3ANEPS or N3AN5GS based on N3AN selection.
      */
-    IWLAN,
+    IWLAN = 5,
     /**
      * Next-Generation Radio Access Network (NGRAN).
      * Note NGRAN is only for standalone mode. Non-standalone mode uses AccessNetwork EUTRAN.
      */
-    NGRAN,
+    NGRAN = 6,
+    /**
+     * Non-3GPP Access Network for EPS.
+     */
+    N3ANEPS = 5,
+    /**
+     * Non-3GPP Access Network for 5GS.
+     */
+    N3AN5GS = 7,
 }
diff --git a/radio/aidl/android/hardware/radio/RadioTechnologyFamily.aidl b/radio/aidl/android/hardware/radio/RadioTechnologyFamily.aidl
index a2b989d..4f4bbcb 100644
--- a/radio/aidl/android/hardware/radio/RadioTechnologyFamily.aidl
+++ b/radio/aidl/android/hardware/radio/RadioTechnologyFamily.aidl
@@ -28,4 +28,8 @@
      * 3GPP2 Technologies - CDMA
      */
     THREE_GPP2,
+    /**
+     * Non 3GPP Technologies - IWLAN, N3IWF
+     */
+    NON_3GPP,
 }
diff --git a/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl b/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl
index 938c695..b2e6ca4 100644
--- a/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl
+++ b/radio/aidl/android/hardware/radio/data/IRadioDataIndication.aidl
@@ -16,6 +16,7 @@
 
 package android.hardware.radio.data;
 
+import android.hardware.radio.AccessNetwork;
 import android.hardware.radio.RadioIndicationType;
 import android.hardware.radio.data.DataProfileInfo;
 import android.hardware.radio.data.KeepaliveStatus;
@@ -71,6 +72,7 @@
      *
      * @param type Type of radio indication
      * @param dataProfileInfo Data profile info.
+     * @deprecated use unthrottleDataProfile to clarify access network for this event.
      */
     void unthrottleApn(in RadioIndicationType type, in DataProfileInfo dataProfileInfo);
 
@@ -86,4 +88,19 @@
      *
      */
     void slicingConfigChanged(in RadioIndicationType type, in SlicingConfig slicingConfig);
+
+    /**
+     * The modem can explicitly set SetupDataCallResult::suggestedRetryTime after a failure in
+     * IRadioData.SetupDataCall. During that time, no new calls are allowed to
+     * IRadioData.SetupDataCall that use the same APN(or DNN) in DataProfile.
+     * When IRadioDataIndication.unthrottleDataProfile is sent, AOSP will no longer throttle calls
+     * to IRadioData.SetupDataCall for the given APN(or DNN) in DataProfile.
+     *
+     * @param type Type of radio indication
+     * @param accessNetwork Access network this throttling occurred, this must match the access
+     *                      network passed in setup data call request.
+     * @param dataProfileInfo Data profile info.
+     */
+    void unthrottleDataProfile(in RadioIndicationType type, in AccessNetwork accessNetwork,
+            in DataProfileInfo dataProfileInfo);
 }
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 0ac8b0e..c82fde2 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -17,7 +17,11 @@
 package android.hardware.radio.network;
 
 import android.hardware.radio.AccessNetwork;
+import android.hardware.radio.RadioTechnologyFamily;
 import android.hardware.radio.network.CdmaRoamingType;
+import android.hardware.radio.network.Domain;
+import android.hardware.radio.network.EmergencyMode;
+import android.hardware.radio.network.EmergencyNetworkScanTrigger;
 import android.hardware.radio.network.IRadioNetworkIndication;
 import android.hardware.radio.network.IRadioNetworkResponse;
 import android.hardware.radio.network.IndicationFilter;
@@ -27,8 +31,6 @@
 import android.hardware.radio.network.RadioBandMode;
 import android.hardware.radio.network.SignalThresholdInfo;
 import android.hardware.radio.network.UsageSetting;
-import android.hardware.radio.network.EmergencyNetworkScanTrigger;
-import android.hardware.radio.network.EmergencyMode;
 
 /**
  * This interface is used by telephony and telecom to talk to cellular radio for network APIs.
@@ -103,6 +105,7 @@
      * @param serial Serial number of request.
      *
      * Response function is IRadioNetworkResponse.getDataRegistrationStateResponse()
+     * @deprecated use getRegistrationState()
      */
     void getDataRegistrationState(in int serial);
 
@@ -167,6 +170,7 @@
      * @param serial Serial number of request.
      *
      * Response function is IRadioNetworkResponse.getVoiceRegistrationStateResponse()
+     * @deprecated use getRegistrationState()
      */
     void getVoiceRegistrationState(in int serial);
 
@@ -449,7 +453,7 @@
      *
      * Response function is IRadioEmergencyResponse.setEmergencyModeResponse()
      */
-    void setEmergencyMode(int serial, in EmergencyMode emcModeType );
+    void setEmergencyMode(int serial, in EmergencyMode emcModeType);
 
     /**
      * Triggers an Emergency network scan.
@@ -460,7 +464,7 @@
      *
      * Response function is IRadioEmergencyResponse.triggerEmergencyNetworkScanResponse()
      */
-    void triggerEmergencyNetworkScan( int serial, in EmergencyNetworkScanTrigger request);
+    void triggerEmergencyNetworkScan(int serial, in EmergencyNetworkScanTrigger request);
 
     /**
      * Cancels ongoing Emergency network scan
@@ -479,4 +483,15 @@
      * Response function is IRadioEmergencyResponse.exitEmergencyModeResponse()
      */
     void exitEmergencyMode(in int serial);
+
+    /**
+     * Request current registration state.
+     *
+     * @param serial Serial number of request.
+     * @param ratFamily RadioTechnologyFamily of request.
+     * @param domain Domain PS or CS of request.
+     *
+     * Response function is IRadioNetworkResponse.getRegistrationStateResponse()
+     */
+    void getRegistrationState(in int serial, in RadioTechnologyFamily ratFamily, in Domain domain);
 }
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
index 243e949..69d53ee 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetworkResponse.aidl
@@ -23,13 +23,13 @@
 import android.hardware.radio.network.CdmaRoamingType;
 import android.hardware.radio.network.CellIdentity;
 import android.hardware.radio.network.CellInfo;
+import android.hardware.radio.network.EmergencyRegResult;
 import android.hardware.radio.network.OperatorInfo;
 import android.hardware.radio.network.RadioAccessSpecifier;
 import android.hardware.radio.network.RadioBandMode;
 import android.hardware.radio.network.RegStateResult;
 import android.hardware.radio.network.SignalStrength;
 import android.hardware.radio.network.UsageSetting;
-import android.hardware.radio.network.EmergencyRegResult;
 
 /**
  * Interface declaring response functions to solicited radio requests for network APIs.
@@ -153,6 +153,8 @@
      *   RadioError:RADIO_NOT_AVAILABLE
      *   RadioError:INTERNAL_ERR
      *   RadioError:NOT_PROVISIONED
+     *
+     * @deprecated use getRegistrationStateResponse()
      */
     void getDataRegistrationStateResponse(
             in RadioResponseInfo info, in RegStateResult dataRegResponse);
@@ -259,6 +261,8 @@
      *   RadioError:NONE
      *   RadioError:RADIO_NOT_AVAILABLE
      *   RadioError:INTERNAL_ERR
+     *
+     * @deprecated use getRegistrationStateResponse()
      */
     void getVoiceRegistrationStateResponse(
             in RadioResponseInfo info, in RegStateResult voiceRegResponse);
@@ -616,4 +620,16 @@
      *   RadioError:MODEM_ERR
      */
     void cancelEmergencyNetworkScanResponse(in RadioResponseInfo info);
+
+    /**
+     * @param info Response info struct containing response type, serial no. and error
+     * @param regResponse Current registration response as defined by RegStateResult
+     *
+     * Valid errors returned:
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:INTERNAL_ERR
+     *   RadioError:NOT_PROVISIONED
+     */
+    void getRegistrationStateResponse(in RadioResponseInfo info, in RegStateResult regResponse);
 }
diff --git a/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl b/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
index 197f401..2b0b7c9 100644
--- a/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
+++ b/radio/aidl/android/hardware/radio/network/NrVopsInfo.aidl
@@ -39,6 +39,10 @@
      * Emergency services supported in NR connected to 5GCN and E-UTRA connected to 5GCN
      */
     const byte EMC_INDICATOR_BOTH_NR_EUTRA_CONNECTED_TO_5GCN = 3;
+    /**
+     * Emergency services supported over 5G N3GPP access.
+     */
+    const byte EMC_INDICATOR_EMC_OVER_NON_3GPP = 4;
 
     /**
      * Emergency services fallback not supported
@@ -96,6 +100,7 @@
      * NR REGISTRATION ACCEPT.
      * Refer 3GPP 24.501 EPS 5GS network feature support -> EMF
      * Values are EMF_INDICATOR_ from TS 24.501 sec 9.10.3.5.
+     * Not Applicable for the registration via non-3GPP access.
      */
     byte emfSupported;
 }
diff --git a/radio/aidl/android/hardware/radio/network/RegStateResult.aidl b/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
index 3d96b8c..979b4b8 100644
--- a/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
+++ b/radio/aidl/android/hardware/radio/network/RegStateResult.aidl
@@ -16,6 +16,7 @@
 
 package android.hardware.radio.network;
 
+import android.hardware.radio.AccessNetwork;
 import android.hardware.radio.RadioTechnology;
 import android.hardware.radio.network.AccessTechnologySpecificInfo;
 import android.hardware.radio.network.CellIdentity;
@@ -59,4 +60,8 @@
      * Access-technology-specific registration information, such as for CDMA2000.
      */
     AccessTechnologySpecificInfo accessTechnologySpecificInfo;
+    /**
+     * Indicates the access network used for this registration.
+     */
+    AccessNetwork accessNetwork = AccessNetwork.UNKNOWN;
 }
diff --git a/radio/aidl/compat/libradiocompat/Android.bp b/radio/aidl/compat/libradiocompat/Android.bp
index f79e045..2f7fc59 100644
--- a/radio/aidl/compat/libradiocompat/Android.bp
+++ b/radio/aidl/compat/libradiocompat/Android.bp
@@ -31,12 +31,13 @@
         "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION",
     ],
     shared_libs: [
+        "android.hardware.radio-V2-ndk",
         "android.hardware.radio.config-V1-ndk",
         "android.hardware.radio.config@1.0",
         "android.hardware.radio.config@1.1",
         "android.hardware.radio.config@1.2",
         "android.hardware.radio.config@1.3",
-        "android.hardware.radio.data-V1-ndk",
+        "android.hardware.radio.data-V2-ndk",
         "android.hardware.radio.messaging-V1-ndk",
         "android.hardware.radio.modem-V1-ndk",
         "android.hardware.radio.network-V2-ndk",
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
index c714190..c886267 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
@@ -99,6 +99,9 @@
                     scanTrigger) override;
     ::ndk::ScopedAStatus cancelEmergencyNetworkScan(int32_t serial) override;
     ::ndk::ScopedAStatus exitEmergencyMode(int32_t serial) override;
+    ::ndk::ScopedAStatus getRegistrationState(
+            int32_t serial, ::aidl::android::hardware::radio::RadioTechnologyFamily ratFamily,
+            ::aidl::android::hardware::radio::network::Domain domain) override;
 
   protected:
     std::shared_ptr<::aidl::android::hardware::radio::network::IRadioNetworkResponse> respond();
diff --git a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
index ff30ac3..638b34e 100644
--- a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
+++ b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
@@ -340,4 +340,16 @@
     return ok();
 }
 
+ScopedAStatus RadioNetwork::getRegistrationState(
+        int32_t serial, ::aidl::android::hardware::radio::RadioTechnologyFamily ratFamily,
+        aidl::Domain domain) {
+    LOG_CALL << serial;
+    if (ratFamily == ::aidl::android::hardware::radio::RadioTechnologyFamily::THREE_GPP &&
+        domain == aidl::Domain::PS) {
+        LOG_CALL << " Radio Technology Family 3GPP and Domain PS";
+    }
+    LOG(ERROR) << " geRegistrationState is unsupported by HIDL HALs";
+    respond()->getRegistrationStateResponse(notSupported(serial), {});
+    return ok();
+}
 }  // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/service/Android.bp b/radio/aidl/compat/service/Android.bp
index 4dbaef4..45a3497 100644
--- a/radio/aidl/compat/service/Android.bp
+++ b/radio/aidl/compat/service/Android.bp
@@ -34,12 +34,13 @@
     ],
     shared_libs: [
         "android.hardware.radio-library.compat",
+        "android.hardware.radio-V2-ndk",
         "android.hardware.radio.config-V1-ndk",
         "android.hardware.radio.config@1.0",
         "android.hardware.radio.config@1.1",
         "android.hardware.radio.config@1.2",
         "android.hardware.radio.config@1.3",
-        "android.hardware.radio.data-V1-ndk",
+        "android.hardware.radio.data-V2-ndk",
         "android.hardware.radio.messaging-V1-ndk",
         "android.hardware.radio.modem-V1-ndk",
         "android.hardware.radio.network-V2-ndk",
diff --git a/radio/aidl/vts/Android.bp b/radio/aidl/vts/Android.bp
index 0d4bb3e..ba68728 100644
--- a/radio/aidl/vts/Android.bp
+++ b/radio/aidl/vts/Android.bp
@@ -63,9 +63,9 @@
         "libvintf",
     ],
     static_libs: [
-        "android.hardware.radio-V1-ndk",
+        "android.hardware.radio-V2-ndk",
         "android.hardware.radio.config-V1-ndk",
-        "android.hardware.radio.data-V1-ndk",
+        "android.hardware.radio.data-V2-ndk",
         "android.hardware.radio.messaging-V1-ndk",
         "android.hardware.radio.modem-V1-ndk",
         "android.hardware.radio.network-V2-ndk",
diff --git a/radio/aidl/vts/radio_data_indication.cpp b/radio/aidl/vts/radio_data_indication.cpp
index 61e079e..213505d 100644
--- a/radio/aidl/vts/radio_data_indication.cpp
+++ b/radio/aidl/vts/radio_data_indication.cpp
@@ -42,3 +42,10 @@
         RadioIndicationType /*type*/, const SlicingConfig& /*slicingConfig*/) {
     return ndk::ScopedAStatus::ok();
 }
+
+ndk::ScopedAStatus RadioDataIndication::unthrottleDataProfile(
+        RadioIndicationType /*type*/,
+        ::aidl::android::hardware::radio::AccessNetwork /*accessNetwork*/,
+        const DataProfileInfo& /*dataProfileInfo*/) {
+    return ndk::ScopedAStatus::ok();
+}
diff --git a/radio/aidl/vts/radio_data_utils.h b/radio/aidl/vts/radio_data_utils.h
index fb91ef6..cfb2ab2 100644
--- a/radio/aidl/vts/radio_data_utils.h
+++ b/radio/aidl/vts/radio_data_utils.h
@@ -97,6 +97,9 @@
                                              const DataProfileInfo& dataProfile) override;
     virtual ndk::ScopedAStatus slicingConfigChanged(RadioIndicationType type,
                                                     const SlicingConfig& slicingConfig) override;
+    virtual ndk::ScopedAStatus unthrottleDataProfile(
+            RadioIndicationType type, ::aidl::android::hardware::radio::AccessNetwork accessNetwork,
+            const DataProfileInfo& dataProfile) override;
 };
 
 // The main test class for Radio AIDL Data.
diff --git a/radio/aidl/vts/radio_network_response.cpp b/radio/aidl/vts/radio_network_response.cpp
index 5599c03..ff58ecd 100644
--- a/radio/aidl/vts/radio_network_response.cpp
+++ b/radio/aidl/vts/radio_network_response.cpp
@@ -293,3 +293,11 @@
     parent_network.notify(info.serial);
     return ndk::ScopedAStatus::ok();
 }
+
+ndk::ScopedAStatus RadioNetworkResponse::getRegistrationStateResponse(
+        const RadioResponseInfo& info, const RegStateResult& regResponse) {
+    rspInfo = info;
+    regResp = regResponse;
+    parent_network.notify(info.serial);
+    return ndk::ScopedAStatus::ok();
+}
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 25c42d3..054b69e 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -15,7 +15,9 @@
  */
 
 #include <aidl/android/hardware/radio/RadioAccessFamily.h>
+#include <aidl/android/hardware/radio/RadioTechnologyFamily.h>
 #include <aidl/android/hardware/radio/config/IRadioConfig.h>
+#include <aidl/android/hardware/radio/network/Domain.h>
 #include <aidl/android/hardware/radio/network/IndicationFilter.h>
 #include <android-base/logging.h>
 #include <android/binder_manager.h>
@@ -1911,3 +1913,91 @@
             {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
     LOG(DEBUG) << "exitEmergencyMode finished";
 }
+
+/*
+ * Test IRadioNetwork.getRegistrationState() for the response returned.
+ */
+TEST_P(RadioNetworkTest, getRegistrationState) {
+    serial = GetRandomSerialNumber();
+
+    ndk::ScopedAStatus res = radio_network->getRegistrationState(
+            serial, RadioTechnologyFamily::THREE_GPP, Domain::PS);
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
+
+    ALOGI("getRegistrationStateResponse, rspInfo.error = %s\n",
+          toString(radioRsp_network->rspInfo.error).c_str());
+    ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_network->rspInfo.error,
+            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::NOT_PROVISIONED}));
+    // Check the mcc [0, 999] and mnc [0, 999].
+    std::string mcc;
+    std::string mnc;
+    bool checkMccMnc = true;
+    CellIdentity cellIdentity = radioRsp_network->regResp.cellIdentity;
+    switch (cellIdentity.getTag()) {
+        case CellIdentity::noinit: {
+            checkMccMnc = false;
+            break;
+        }
+        case CellIdentity::gsm: {
+            CellIdentityGsm cig = cellIdentity.get<CellIdentity::gsm>();
+            mcc = cig.mcc;
+            mnc = cig.mnc;
+            break;
+        }
+        case CellIdentity::wcdma: {
+            CellIdentityWcdma ciw = cellIdentity.get<CellIdentity::wcdma>();
+            mcc = ciw.mcc;
+            mnc = ciw.mnc;
+            break;
+        }
+        case CellIdentity::tdscdma: {
+            CellIdentityTdscdma cit = cellIdentity.get<CellIdentity::tdscdma>();
+            mcc = cit.mcc;
+            mnc = cit.mnc;
+            break;
+        }
+        case CellIdentity::cdma: {
+            // CellIdentityCdma has no mcc/mnc
+            CellIdentityCdma cic = cellIdentity.get<CellIdentity::cdma>();
+            checkMccMnc = false;
+            break;
+        }
+        case CellIdentity::lte: {
+            CellIdentityLte cil = cellIdentity.get<CellIdentity::lte>();
+            mcc = cil.mcc;
+            mnc = cil.mnc;
+            break;
+        }
+        case CellIdentity::nr: {
+            CellIdentityNr cin = cellIdentity.get<CellIdentity::nr>();
+            mcc = cin.mcc;
+            mnc = cin.mnc;
+            break;
+        }
+    }
+
+    // 32 bit system might return invalid mcc and mnc string "\xff\xff..."
+    if (checkMccMnc && mcc.size() < 4 && mnc.size() < 4) {
+        int mcc_int = stoi(mcc);
+        int mnc_int = stoi(mnc);
+        EXPECT_TRUE(mcc_int >= 0 && mcc_int <= 999);
+        EXPECT_TRUE(mnc_int >= 0 && mnc_int <= 999);
+    }
+
+    // Check for access technology specific info
+    AccessTechnologySpecificInfo info = radioRsp_network->regResp.accessTechnologySpecificInfo;
+    RadioTechnology rat = radioRsp_network->regResp.rat;
+    // TODO: add logic for cdmaInfo
+    if (rat == RadioTechnology::LTE || rat == RadioTechnology::LTE_CA) {
+        ASSERT_EQ(info.getTag(), AccessTechnologySpecificInfo::eutranInfo);
+    } else if (rat == RadioTechnology::NR) {
+        ASSERT_EQ(info.getTag(), AccessTechnologySpecificInfo::ngranNrVopsInfo);
+    }
+    AccessNetwork an = radioRsp_network->regResp.accessNetwork;
+    ASSERT_NE(an, AccessNetwork::N3AN5GS);
+    ASSERT_NE(an, AccessNetwork::N3ANEPS);
+}
diff --git a/radio/aidl/vts/radio_network_utils.h b/radio/aidl/vts/radio_network_utils.h
index 8480825..f30b742 100644
--- a/radio/aidl/vts/radio_network_utils.h
+++ b/radio/aidl/vts/radio_network_utils.h
@@ -42,6 +42,7 @@
     int networkTypeBitmapResponse;
     RegStateResult voiceRegResp;
     RegStateResult dataRegResp;
+    RegStateResult regResp;
     CellIdentity barringCellIdentity;
     std::vector<BarringInfo> barringInfoList;
     UsageSetting usageSetting;
@@ -158,6 +159,9 @@
 
     virtual ndk::ScopedAStatus cancelEmergencyNetworkScanResponse(
             const RadioResponseInfo& info) override;
+
+    virtual ndk::ScopedAStatus getRegistrationStateResponse(
+            const RadioResponseInfo& info, const RegStateResult& regResponse) override;
 };
 
 /* Callback class for radio network indication */