Merge "Revert "Move android.hardware.benchmarks into android.hardware.tests""
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 962f6cd..212c8b1 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -48,3 +48,7 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/bin/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/hw/android.hardware.bluetooth*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/android.hardware.bluetooth*)
diff --git a/bluetooth/1.0/default/Android.bp b/bluetooth/1.0/default/Android.bp
index 2ae262c..fb20195 100644
--- a/bluetooth/1.0/default/Android.bp
+++ b/bluetooth/1.0/default/Android.bp
@@ -15,6 +15,7 @@
 
 cc_library_shared {
     name: "android.hardware.bluetooth@1.0-impl",
+    proprietary: true,
     relative_install_path: "hw",
     srcs: [
         "bluetooth_hci.cc",
diff --git a/bluetooth/1.0/default/Android.mk b/bluetooth/1.0/default/Android.mk
index 5043fb9..7530925 100644
--- a/bluetooth/1.0/default/Android.mk
+++ b/bluetooth/1.0/default/Android.mk
@@ -17,6 +17,7 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_PROPRIETARY_MODULE := true
 LOCAL_MODULE := android.hardware.bluetooth@1.0-service
 LOCAL_INIT_RC := android.hardware.bluetooth@1.0-service.rc
 LOCAL_SRC_FILES := \
diff --git a/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc b/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
index 8c5c02a..8545d2f 100644
--- a/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
+++ b/bluetooth/1.0/default/android.hardware.bluetooth@1.0-service.rc
@@ -1,4 +1,4 @@
-service bluetooth-1-0 /system/bin/hw/android.hardware.bluetooth@1.0-service
+service bluetooth-1-0 /vendor/bin/hw/android.hardware.bluetooth@1.0-service
     class hal
     user bluetooth
     group bluetooth
diff --git a/bluetooth/1.0/vts/functional/Android.bp b/bluetooth/1.0/vts/functional/Android.bp
index 939a07f..a57a55a 100644
--- a/bluetooth/1.0/vts/functional/Android.bp
+++ b/bluetooth/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
 
 cc_test {
     name: "VtsHalBluetoothV1_0TargetTest",
-    gtest: true,
     srcs: ["VtsHalBluetoothV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
@@ -28,7 +27,7 @@
         "libutils",
         "android.hardware.bluetooth@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetBaseTest"],
     cflags: [
         "-O0",
         "-g",
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index 5a6c29a..c8c7cb5 100644
--- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -23,7 +23,7 @@
 #include <hardware/bluetooth.h>
 #include <utils/Log.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 #include <condition_variable>
 #include <mutex>
 #include <queue>
@@ -117,11 +117,11 @@
 };
 
 // The main test class for Bluetooth HIDL HAL.
-class BluetoothHidlTest : public ::testing::Test {
+class BluetoothHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
  public:
   virtual void SetUp() override {
     // currently test passthrough mode only
-    bluetooth = IBluetoothHci::getService();
+    bluetooth = ::testing::VtsHalHidlTargetBaseTest::getService<IBluetoothHci>();
     ASSERT_NE(bluetooth, nullptr);
     ALOGI("%s: getService() for bluetooth is %s", __func__,
           bluetooth->isRemote() ? "remote" : "local");
diff --git a/ir/1.0/vts/functional/Android.bp b/ir/1.0/vts/functional/Android.bp
index ac29996..fe0a595 100644
--- a/ir/1.0/vts/functional/Android.bp
+++ b/ir/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
 
 cc_test {
     name: "VtsHalIrV1_0TargetTest",
-    gtest: true,
     srcs: ["VtsHalIrV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
@@ -27,7 +26,7 @@
         "libutils",
         "android.hardware.ir@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetBaseTest"],
     cflags: [
         "-O0",
         "-g",
diff --git a/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp b/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
index 08c7974..605eabb 100644
--- a/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
+++ b/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
 #include <android/hardware/ir/1.0/IConsumerIr.h>
 #include <android/hardware/ir/1.0/types.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 #include <algorithm>
 
 using ::android::hardware::ir::V1_0::IConsumerIr;
@@ -31,10 +31,10 @@
 using ::android::sp;
 
 // The main test class for IR HIDL HAL.
-class ConsumerIrHidlTest : public ::testing::Test {
+class ConsumerIrHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
  public:
   virtual void SetUp() override {
-    ir = IConsumerIr::getService();
+    ir = ::testing::VtsHalHidlTargetBaseTest::getService<IConsumerIr>();
     ASSERT_NE(ir, nullptr);
   }
 
diff --git a/nfc/1.0/vts/functional/Android.bp b/nfc/1.0/vts/functional/Android.bp
index 23d83e5..0ab8dc5 100644
--- a/nfc/1.0/vts/functional/Android.bp
+++ b/nfc/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
 
 cc_test {
     name: "VtsHalNfcV1_0TargetTest",
-    gtest: true,
     srcs: ["VtsHalNfcV1_0TargetTest.cpp"],
     shared_libs: [
         "libbase",
@@ -28,7 +27,7 @@
         "libutils",
         "android.hardware.nfc@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetBaseTest"],
     cflags: [
         "-O0",
         "-g",
diff --git a/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp b/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
index a0c5f1a..5b6089d 100644
--- a/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
+++ b/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
@@ -22,7 +22,7 @@
 #include <android/hardware/nfc/1.0/types.h>
 #include <hardware/nfc.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 #include <chrono>
 #include <condition_variable>
 #include <mutex>
@@ -56,10 +56,10 @@
 #define TIMEOUT_PERIOD 5
 
 // The main test class for NFC HIDL HAL.
-class NfcHidlTest : public ::testing::Test {
+class NfcHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
  public:
   virtual void SetUp() override {
-    nfc_ = INfc::getService();
+    nfc_ = ::testing::VtsHalHidlTargetBaseTest::getService<INfc>();
     ASSERT_NE(nfc_, nullptr);
 
     nfc_cb_ = new NfcClientCallback(*this);
diff --git a/radio/1.0/Android.mk b/radio/1.0/Android.mk
index 7f4c7d4..94072fb 100644
--- a/radio/1.0/Android.mk
+++ b/radio/1.0/Android.mk
@@ -929,6 +929,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (CellIdentity)
+#
+GEN := $(intermediates)/android/hardware/radio/V1_0/CellIdentity.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio@1.0::types.CellIdentity
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (CellIdentityCdma)
 #
 GEN := $(intermediates)/android/hardware/radio/V1_0/CellIdentityCdma.java
@@ -3944,6 +3963,25 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
+# Build types.hal (CellIdentity)
+#
+GEN := $(intermediates)/android/hardware/radio/V1_0/CellIdentity.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava \
+        -randroid.hardware:hardware/interfaces \
+        -randroid.hidl:system/libhidl/transport \
+        android.hardware.radio@1.0::types.CellIdentity
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (CellIdentityCdma)
 #
 GEN := $(intermediates)/android/hardware/radio/V1_0/CellIdentityCdma.java
diff --git a/radio/1.0/IRadio.hal b/radio/1.0/IRadio.hal
index baa4df6..a8c9d93 100644
--- a/radio/1.0/IRadio.hal
+++ b/radio/1.0/IRadio.hal
@@ -378,13 +378,18 @@
      * @param radioTechnology Radio technology to use.
      * @param dataProfileInfo data profile info.
      * @param modemCognitive Indicating this profile was sent to the modem through setDataProfile
-     *        earlier.
+     *                       earlier.
      * @param roamingAllowed Indicating data roaming is allowed or not by the user.
+     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+     *                  RIL API must be filled accordingly based on the roaming condition.
+     *                  Note this is for backward compatibility with the old radio modem. The modem
+     *                  must not use this param for any other reason.
      *
      * Response function is IRadioResponse.setupDataCallResponse()
      */
     oneway setupDataCall(int32_t serial, RadioTechnology radioTechnology,
-            DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed);
+            DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed,
+            bool isRoaming);
 
     /*
      * Request ICC I/O operation.
@@ -1139,7 +1144,7 @@
     oneway reportSmsMemoryStatus(int32_t serial, bool available);
 
     /*
-     * Indicates that the StkSerivce is running and is
+     * Indicates that the StkService is running and is
      * ready to receive unsolicited stkXXXXX commands.
      *
      * @param serial Serial number of request.
@@ -1241,13 +1246,17 @@
      *
      * @param serial Serial number of request.
      * @param dataProfileInfo data profile containing APN settings
-     * @param modemCognitive is indicating the data profile was sent to the modem through
-     *        setDataProfile earlier.
+     * @param modemCognitive indicating the data profile was sent to the modem through
+     *                       setDataProfile earlier.
+     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+     *                  RIL_InitialAttachApn must be filled accordingly based on the roaming
+     *                  condition. Note this is for backward compatibility with the old radio modem.
+     *                  The modem must not use this param for any other reason.
      *
      * Response callback is IRadioResponse.setInitialAttachApnResponse()
      */
     oneway setInitialAttachApn(int32_t serial, DataProfileInfo dataProfileInfo,
-            bool modemCognitive);
+            bool modemCognitive, bool isRoaming);
 
     /*
      * Request current IMS registration state
@@ -1413,10 +1422,14 @@
      *
      * @param serial Serial number of request.
      * @param profiles Array of DataProfiles to set.
+     * @param isRoaming Indicating the device is roaming or not. The 'protocol' parameter in the old
+     *                  RIL API RIL_DataProfileInfo must be filled accordingly based on the
+     *                  roaming condition. Note this is for backward compatibility with the old
+     *                  radio modem. The modem must not use this param for any other reason.
      *
      * Response callback is IRadioResponse.setDataProfileResponse()
      */
-    oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles);
+    oneway setDataProfile(int32_t serial, vec<DataProfileInfo> profiles, bool isRoaming);
 
     /*
      * Device is shutting down. All further commands are ignored
@@ -1429,7 +1442,7 @@
     oneway requestShutdown(int32_t serial);
 
     /*
-     * Used to get phone radio capablility.
+     * Used to get phone radio capability.
      *
      * @param serial Serial number of request.
      *
diff --git a/radio/1.0/types.hal b/radio/1.0/types.hal
index 91030ef..7c1d143 100644
--- a/radio/1.0/types.hal
+++ b/radio/1.0/types.hal
@@ -499,21 +499,21 @@
  * "managed roaming"
  */
 enum RegState : int32_t {
-    NOT_REG_MT_NOT_SEARCHING_OP,          // Not registered, MT is not currently searching
+    NOT_REG_MT_NOT_SEARCHING_OP = 0,      // Not registered, MT is not currently searching
                                           // a new operator to register
-    REG_HOME,                             // Registered, home network
-    NOT_REG_MT_SEARCHING_OP,              // Not registered, but MT is currently searching
+    REG_HOME = 1,                         // Registered, home network
+    NOT_REG_MT_SEARCHING_OP = 2,          // Not registered, but MT is currently searching
                                           // a new operator to register
-    REG_DENIED,                           // Registration denied
-    UNKNOWN,                              // Unknown
-    REG_ROAMING,                          // Registered, roaming
-    NOT_REG_MT_NOT_SEARCHING_OP_EM,       // Same as NOT_REG_MT_NOT_SEARCHING_OP but indicates that
+    REG_DENIED = 3,                       // Registration denied
+    UNKNOWN = 4,                          // Unknown
+    REG_ROAMING = 5,                      // Registered, roaming
+    NOT_REG_MT_NOT_SEARCHING_OP_EM = 10,  // Same as NOT_REG_MT_NOT_SEARCHING_OP but indicates that
                                           // emergency calls are enabled.
-    NOT_REG_MT_SEARCHING_OP_EM,           // Same as NOT_REG_MT_SEARCHING_OP but indicates that
+    NOT_REG_MT_SEARCHING_OP_EM = 12,      // Same as NOT_REG_MT_SEARCHING_OP but indicates that
                                           // emergency calls are enabled.
-    REG_DENIED_EM,                        // Same as REG_DENIED but indicates that
+    REG_DENIED_EM = 13,                   // Same as REG_DENIED but indicates that
                                           // emergency calls are enabled.
-    UNKNOWN_EM,                           // Same as UNKNOWN but indicates that
+    UNKNOWN_EM = 14,                      // Same as UNKNOWN but indicates that
                                           // emergency calls are enabled.
 };
 
@@ -815,6 +815,7 @@
 };
 
 enum CellInfoType : int32_t {
+    NONE = 0,
     GSM = 1,
     CDMA = 2,
     LTE = 3,
@@ -1281,11 +1282,11 @@
 };
 
 struct SetupDataCallResult {
-    int32_t status;                       // A RadioDataCallFailCause, 0 which is
-                                          // RadioDataCallFailCause:NONE if no error
-    int32_t suggestedRetryTime;           // If status != 0, this fields indicates the suggested
-                                          // retry back-off timer value RIL wants to override the
-                                          // one pre-configured in FW.
+    DataCallFailCause status;             // Data call fail cause. DataCallFailCause.NONE if no
+                                          // error.
+    int32_t suggestedRetryTime;           // If status != DataCallFailCause.NONE, this field
+                                          // indicates the suggested retry back-off timer value RIL
+                                          // wants to override the one pre-configured in FW.
                                           // The unit is milliseconds.
                                           // The value < 0 means no value is suggested.
                                           // The value 0 means retry must be done ASAP.
@@ -1296,8 +1297,8 @@
     string type;                          // One of the PDP_type values in TS 27.007 section 10.1.1.
                                           // For example, "IP", "IPV6", "IPV4V6", or "PPP". If
                                           // status is
-                                          // RadioDataCallFailCause:ONLY_SINGLE_BEARER_ALLOWED this
-                                          // is the type supported such as "IP" or "IPV6"
+                                          // DataCallFailCause.ONLY_SINGLE_BEARER_ALLOWED, this
+                                          // is the type supported such as "IP" or "IPV6".
     string ifname;                        // The network interface name
     string addresses;                     // A space-delimited list of addresses with optional "/"
                                           // prefix length, e.g., "192.0.1.3" or
@@ -1343,125 +1344,6 @@
                                           // Base64 format, see 3GPP TS 31.102 7.1.2
 };
 
-struct VoiceRegStateResult {
-    RegState regState;
-    int32_t lac;                          // LAC if registered on a GSM/WCDMA system or
-                                          // -1 if not.Valid LAC are 0x0000 - 0xffff
-    int32_t cid;                          // CID. if registered on a * GSM/WCDMA or -1 if not
-                                          // Valid CID are 0x00000000 - 0xffffffff
-                                          // In GSM, CID is Cell ID (see TS 27.007) in 16 bits
-                                          // In UMTS, CID is UMTS Cell Identity (see TS 25.331)
-                                          // in 28 bits
-    int32_t rat;                          // indicates the available voice radio technology,
-                                          // valid values as defined by RadioTechnology.
-    int32_t baseStationId;                // Base Station ID. if registered on a CDMA
-                                          // system or -1 if not. Base Station ID in decimal format
-    int32_t baseStationLatitude;          // Base Station latitude. if registered on a
-                                          // CDMA system or -1 if not. Base Station latitude is a
-                                          // decimal number as specified in 3GPP2 C.S0005-A v6.0.
-                                          // It is represented in units of 0.25 seconds and ranges
-                                          // from -1296000 to 1296000, both values inclusive
-                                          // (corresponding to a range of -90 to +90 degrees).
-    int32_t baseStationLongitude;         // Base Station longitude. if registered on a
-                                          // CDMA system or -1 if not. Base Station
-                                          // longitude is a decimal number as specified in
-                                          // 3GPP2 C.S0005-A v6.0. It is represented in
-                                          // units of 0.25 seconds and ranges from -2592000
-                                          // to 2592000, both values inclusive (corresponding
-                                          // to a range of -180 to +180 degrees).
-    bool cssSupported;                    // concurrent services support indicator. if
-                                          // registered on a CDMA system.
-                                          // false - Concurrent services not supported,
-                                          // true - Concurrent services supported
-    int32_t systemId;                     // System ID. if registered on a CDMA system or
-                                          // -1 if not. Valid System ID are 0 - 32767
-    int32_t networkId;                    // Network ID. if registered on a CDMA system or
-                                          // -1 if not. Valid System ID are 0 - 65535
-    int32_t roamingIndicator;             // TSB-58 Roaming Indicator if registered
-                                          // on a CDMA or EVDO system or -1 if not.
-                                          // Valid values are 0-255.
-    int32_t systemIsInPrl;                // indicates whether the current system is in the
-                                          // PRL if registered on a CDMA or EVDO system or -1 if
-                                          // not. 0=not in the PRL, 1=in the PRL
-    int32_t defaultRoamingIndicator;      // default Roaming Indicator from the PRL,
-                                          // if registered on a CDMA or EVDO system or -1 if not.
-                                          // Valid values are 0-255.
-    int32_t reasonForDenial;              // reasonForDenial if registration state is 3
-                                          // (Registration denied) this is an enumerated reason why
-                                          // registration was denied. See 3GPP TS 24.008,
-                                          // 10.5.3.6 and Annex G.
-                                          // 0 - General
-                                          // 1 - Authentication Failure
-                                          // 2 - IMSI unknown in HLR
-                                          // 3 - Illegal MS
-                                          // 4 - Illegal ME
-                                          // 5 - PLMN not allowed
-                                          // 6 - Location area not allowed
-                                          // 7 - Roaming not allowed
-                                          // 8 - No Suitable Cells in this Location Area
-                                          // 9 - Network failure
-                                          // 10 - Persistent location update reject
-                                          // 11 - PLMN not allowed
-                                          // 12 - Location area not allowed
-                                          // 13 - Roaming not allowed in this Location Area
-                                          // 15 - No Suitable Cells in this Location Area
-                                          // 17 - Network Failure
-                                          // 20 - MAC Failure
-                                          // 21 - Sync Failure
-                                          // 22 - Congestion
-                                          // 23 - GSM Authentication unacceptable
-                                          // 25 - Not Authorized for this CSG
-                                          // 32 - Service option not supported
-                                          // 33 - Requested service option not subscribed
-                                          // 34 - Service option temporarily out of order
-                                          // 38 - Call cannot be identified
-                                          // 48-63 - Retry upon entry into a new cell
-                                          // 95 - Semantically incorrect message
-                                          // 96 - Invalid mandatory information
-                                          // 97 - Message type non-existent or not implemented
-                                          // 98 - Message type not compatible with protocol state
-                                          // 99 - Information element non-existent or not implemented
-                                          // 100 - Conditional IE error
-                                          // 101 - Message not compatible with protocol state
-                                          // 111 - Protocol error, unspecified
-    int32_t psc;                          // Primary Scrambling Code of the current
-                                          // cell as described in TS 25.331, in hexadecimal
-                                          // format, or -1 if unknown or not registered
-                                          // to a UMTS network.
-};
-
-struct DataRegStateResult {
-    RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
-                                          // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
-                                          // UNKNOWN, REG_ROAMING defined in RegState
-    int32_t lac;                          // LAC if registered or -1 if not
-                                          // valid LAC are 0x0000 - 0xffff
-    int32_t cid;                          // CID if registered or -1 if not
-                                          // valid CID are 0x00000000 - 0x0fffffff
-    int32_t rat;                          // indicates the available data radio technology,
-                                          // valid values as defined by RadioTechnology.
-    int32_t reasonDataDenied;             // if registration state is 3 (Registration
-                                          // denied) this is an enumerated reason why
-                                          // registration was denied. See 3GPP TS 24.008,
-                                          // Annex G.6 "Additional cause codes for GMM".
-                                          // 7 == GPRS services not allowed
-                                          // 8 == GPRS services and non-GPRS services not allowed
-                                          // 9 == MS identity cannot be derived by the network
-                                          // 10 == Implicitly detached
-                                          // 14 == GPRS services not allowed in this PLMN
-                                          // 16 == MSC temporarily not reachable
-                                          // 40 == No PDP context activated
-    int32_t maxDataCalls;                 // The maximum number of simultaneous Data Calls that
-                                          // must be established using setupDataCall().
-    // The values below are optional LTE location information in decimal.
-    // If a value is unknown that value must be -1.
-    int32_t tac;                          // a 16-bit Tracking Area Code.
-    int32_t phyCid;                       // a 0-503 Physical Cell Identifier.
-    int32_t eci;                          // a 28-bit E-UTRAN Cell Identifier.
-    int32_t csgid;                        // a 27-bit Closed Subscriber Group Identity.
-    int32_t tadv;                         // a 6-bit timing advance value.
-};
-
 // See also com.android.internal.telephony.gsm.CallForwardInfo
 struct CallForwardInfo {
     CallForwardInfoStatus status;         // For queryCallForwardStatus()
@@ -1687,6 +1569,100 @@
                                           // empty
 };
 
+struct CellIdentity {
+    CellInfoType cellInfoType;            // cell type for selecting from union CellInfo
+    // Only one of the below vectors must be of size 1, based on a valid CellInfoType and
+    // others must be of size 0. If cell info type is NONE, then all the vectors
+    // must be of size 0.
+    vec<CellIdentityGsm> cellIdentityGsm;
+    vec<CellIdentityWcdma> cellIdentityWcdma;
+    vec<CellIdentityCdma> cellIdentityCdma;
+    vec<CellIdentityLte> cellIdentityLte;
+    vec<CellIdentityTdscdma> cellIdentityTdscdma;
+};
+
+struct VoiceRegStateResult {
+    RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
+                                          // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
+                                          // UNKNOWN, REG_ROAMING defined in RegState
+    int32_t rat;                          // indicates the available voice radio technology,
+                                          // valid values as defined by RadioTechnology.
+    bool cssSupported;                    // concurrent services support indicator. if
+                                          // registered on a CDMA system.
+                                          // false - Concurrent services not supported,
+                                          // true - Concurrent services supported
+    int32_t roamingIndicator;             // TSB-58 Roaming Indicator if registered
+                                          // on a CDMA or EVDO system or -1 if not.
+                                          // Valid values are 0-255.
+    int32_t systemIsInPrl;                // indicates whether the current system is in the
+                                          // PRL if registered on a CDMA or EVDO system or -1 if
+                                          // not. 0=not in the PRL, 1=in the PRL
+    int32_t defaultRoamingIndicator;      // default Roaming Indicator from the PRL,
+                                          // if registered on a CDMA or EVDO system or -1 if not.
+                                          // Valid values are 0-255.
+    int32_t reasonForDenial;              // reasonForDenial if registration state is 3
+                                          // (Registration denied) this is an enumerated reason why
+                                          // registration was denied. See 3GPP TS 24.008,
+                                          // 10.5.3.6 and Annex G.
+                                          // 0 - General
+                                          // 1 - Authentication Failure
+                                          // 2 - IMSI unknown in HLR
+                                          // 3 - Illegal MS
+                                          // 4 - Illegal ME
+                                          // 5 - PLMN not allowed
+                                          // 6 - Location area not allowed
+                                          // 7 - Roaming not allowed
+                                          // 8 - No Suitable Cells in this Location Area
+                                          // 9 - Network failure
+                                          // 10 - Persistent location update reject
+                                          // 11 - PLMN not allowed
+                                          // 12 - Location area not allowed
+                                          // 13 - Roaming not allowed in this Location Area
+                                          // 15 - No Suitable Cells in this Location Area
+                                          // 17 - Network Failure
+                                          // 20 - MAC Failure
+                                          // 21 - Sync Failure
+                                          // 22 - Congestion
+                                          // 23 - GSM Authentication unacceptable
+                                          // 25 - Not Authorized for this CSG
+                                          // 32 - Service option not supported
+                                          // 33 - Requested service option not subscribed
+                                          // 34 - Service option temporarily out of order
+                                          // 38 - Call cannot be identified
+                                          // 48-63 - Retry upon entry into a new cell
+                                          // 95 - Semantically incorrect message
+                                          // 96 - Invalid mandatory information
+                                          // 97 - Message type non-existent or not implemented
+                                          // 98 - Message type not compatible with protocol state
+                                          // 99 - Information element non-existent or not implemented
+                                          // 100 - Conditional IE error
+                                          // 101 - Message not compatible with protocol state
+                                          // 111 - Protocol error, unspecified
+    CellIdentity cellIdentity;
+};
+
+struct DataRegStateResult {
+    RegState regState;                    // Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
+                                          // REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
+                                          // UNKNOWN, REG_ROAMING defined in RegState
+    int32_t rat;                          // indicates the available data radio technology,
+                                          // valid values as defined by RadioTechnology.
+    int32_t reasonDataDenied;             // if registration state is 3 (Registration
+                                          // denied) this is an enumerated reason why
+                                          // registration was denied. See 3GPP TS 24.008,
+                                          // Annex G.6 "Additional cause codes for GMM".
+                                          // 7 == GPRS services not allowed
+                                          // 8 == GPRS services and non-GPRS services not allowed
+                                          // 9 == MS identity cannot be derived by the network
+                                          // 10 == Implicitly detached
+                                          // 14 == GPRS services not allowed in this PLMN
+                                          // 16 == MSC temporarily not reachable
+                                          // 40 == No PDP context activated
+    int32_t maxDataCalls;                 // The maximum number of simultaneous Data Calls that
+                                          // must be established using setupDataCall().
+    CellIdentity cellIdentity;
+};
+
 struct GsmSmsMessage {
     string smscPdu;                       // SMSC address in GSM BCD format prefixed by a length
                                           // byte (as expected by TS 27.005) or empty string for
@@ -2005,4 +1981,4 @@
                                           // to send all of them.
     vec<uint8_t> contents;                // Carrier-defined content. It is binary, opaque and
                                           // loosely defined in LTE Layer 3 spec 24.008
-};
\ No newline at end of file
+};
diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp
index 03434f4..10bd725 100644
--- a/radio/1.0/vts/functional/Android.bp
+++ b/radio/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
 
 cc_test {
     name: "VtsHalRadioV1_0TargetTest",
-    gtest: true,
     srcs: ["radio_hidl_hal_test.cpp",
            "radio_response.cpp",
            "radio_hidl_hal_icc.cpp",
@@ -31,7 +30,7 @@
         "libutils",
         "android.hardware.radio@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetBaseTest"],
     cflags: [
         "-O0",
         "-g",
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
index 9b540e8..bd979b0 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
@@ -20,86 +20,271 @@
  * Test IRadio.getIccCardStatus() for the response returned.
  */
 TEST_F(RadioHidlTest, getIccCardStatus) {
-    radio->getIccCardStatus(1);
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(1, radioRsp->rspInfo.serial);
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
-
-    EXPECT_LE(radioRsp->cardStatus.applications.size(), (unsigned int) RadioConst::CARD_MAX_APPS);
-    EXPECT_LT(radioRsp->cardStatus.gsmUmtsSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
-    EXPECT_LT(radioRsp->cardStatus.cdmaSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
-    EXPECT_LT(radioRsp->cardStatus.imsSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
+    EXPECT_LE(cardStatus.applications.size(), (unsigned int) RadioConst::CARD_MAX_APPS);
+    EXPECT_LT(cardStatus.gsmUmtsSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
+    EXPECT_LT(cardStatus.cdmaSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
+    EXPECT_LT(cardStatus.imsSubscriptionAppIndex, (int) RadioConst::CARD_MAX_APPS);
 }
 
 /*
- * Test IRadio.supplyIccPinForApp() for the response returned.
+ * Test IRadio.supplyIccPinForApp() for the response returned
  */
 TEST_F(RadioHidlTest, supplyIccPinForApp) {
-    radio->supplyIccPinForApp(2, hidl_string("test1"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(2, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->supplyIccPinForApp(++serial, hidl_string("test1"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.supplyIccPukForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, supplyIccPukForApp) {
-    radio->supplyIccPukForApp(3, hidl_string("test1"), hidl_string("test2"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(3, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->supplyIccPukForApp(++serial, hidl_string("test1"), hidl_string("test2"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.supplyIccPin2ForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, supplyIccPin2ForApp) {
-    radio->supplyIccPin2ForApp(4, hidl_string("test1"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(4, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->supplyIccPin2ForApp(++serial, hidl_string("test1"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.supplyIccPuk2ForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, supplyIccPuk2ForApp) {
-    radio->supplyIccPuk2ForApp(5, hidl_string("test1"), hidl_string("test2"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(5, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->supplyIccPuk2ForApp(++serial, hidl_string("test1"), hidl_string("test2"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.changeIccPinForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, changeIccPinForApp) {
-    radio->changeIccPinForApp(6, hidl_string("test1"), hidl_string("test2"), hidl_string());
-    EXPECT_EQ(std::cv_status::no_timeout, wait());
-    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(6, radioRsp->rspInfo.serial);
+    int serial = 1;
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->changeIccPinForApp(++serial, hidl_string("test1"), hidl_string("test2"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
 }
 
 /*
  * Test IRadio.changeIccPin2ForApp() for the response returned.
  */
 TEST_F(RadioHidlTest, changeIccPin2ForApp) {
-    radio->changeIccPin2ForApp(7, hidl_string("test1"), hidl_string("test2"), hidl_string());
+    int serial = 1;
+
+    // Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->changeIccPin2ForApp(++serial, hidl_string("test1"), hidl_string("test2"),
+                    cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(RadioError::PASSWORD_INCORRECT, radioRsp->rspInfo.error);
+        }
+    }
+}
+
+/*
+ * Test IRadio.getImsiForApp() for the response returned.
+ */
+TEST_F(RadioHidlTest, getImsiForApp) {
+    int serial = 1;
+
+    // Check success returned while getting imsi for 3GPP and 3GPP2 apps only
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        if (cardStatus.applications[i].appType == AppType::SIM
+                || cardStatus.applications[i].appType == AppType::USIM
+                || cardStatus.applications[i].appType == AppType::RUIM
+                || cardStatus.applications[i].appType == AppType::CSIM) {
+            radio->getImsiForApp(++serial, cardStatus.applications[i].aidPtr);
+            EXPECT_EQ(std::cv_status::no_timeout, wait());
+            EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+            EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+            EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
+
+            // IMSI (MCC+MNC+MSIN) is at least 6 digits, but not more than 15
+            if (radioRsp->rspInfo.error == RadioError::NONE) {
+                EXPECT_NE(radioRsp->imsi, hidl_string());
+                EXPECT_GE((int) (radioRsp->imsi).size(), 6);
+                EXPECT_LE((int) (radioRsp->imsi).size(), 15);
+            }
+        }
+    }
+}
+
+/*
+ * Test IRadio.iccIOForApp() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccIOForApp) {
+    int serial = 1;
+
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        IccIo iccIo;
+        iccIo.command = 0xc0;
+        iccIo.fileId = 0x6f11;
+        iccIo.path = hidl_string("3F007FFF");
+        iccIo.p1 = 0;
+        iccIo.p2 = 0;
+        iccIo.p3 = 0;
+        iccIo.data = hidl_string();
+        iccIo.pin2 = hidl_string();
+        iccIo.aid = cardStatus.applications[i].aidPtr;
+
+        radio->iccIOForApp(++serial, iccIo);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+        EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+    }
+}
+
+/*
+ * Test IRadio.iccTransmitApduBasicChannel() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccTransmitApduBasicChannel) {
+    int serial = 1;
+    SimApdu msg;
+    memset(&msg, 0, sizeof(msg));
+    msg.data = hidl_string();
+
+    radio->iccTransmitApduBasicChannel(serial, msg);
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
-    EXPECT_EQ(7, radioRsp->rspInfo.serial);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
 
-    EXPECT_EQ(radioRsp->rspInfo.error, RadioError::PASSWORD_INCORRECT);
+    // TODO(sanketpadawe): Add test for error code
 }
+
+/*
+ * Test IRadio.iccOpenLogicalChannel() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccOpenLogicalChannel) {
+    int serial = 1;
+
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        radio->iccOpenLogicalChannel(++serial, cardStatus.applications[i].aidPtr);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    }
+}
+
+/*
+ * Test IRadio.iccCloseLogicalChannel() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccCloseLogicalChannel) {
+    int serial = 1;
+    // Try closing invalid channel and check INVALID_ARGUMENTS returned as error
+    radio->iccCloseLogicalChannel(serial, 0);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+
+    EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error);
+}
+
+/*
+ * Test IRadio.iccTransmitApduLogicalChannel() for the response returned.
+ */
+TEST_F(RadioHidlTest, iccTransmitApduLogicalChannel) {
+    SimApdu msg;
+    memset(&msg, 0, sizeof(msg));
+    msg.data = hidl_string();
+
+    radio->iccTransmitApduLogicalChannel(1, msg);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(1, radioRsp->rspInfo.serial);
+
+    // TODO(sanketpadawe): Add test for error code
+}
+
+/*
+ * Test IRadio.requestIccSimAuthentication() for the response returned.
+ */
+TEST_F(RadioHidlTest, requestIccSimAuthentication) {
+    int serial = 1;
+
+    // Pass wrong challenge string and check RadioError::INVALID_ARGUMENTS returned as error.
+    for (int i = 0; i < (int) cardStatus.applications.size(); i++) {
+        radio->requestIccSimAuthentication(++serial, 0, hidl_string("test"),
+                cardStatus.applications[i].aidPtr);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(serial, radioRsp->rspInfo.serial);
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+        EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error);
+    }
+}
\ No newline at end of file
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
index 2a67954..50b27e9 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
@@ -17,7 +17,7 @@
 #include<radio_hidl_hal_utils.h>
 
 void RadioHidlTest::SetUp() {
-    radio = IRadio::getService(hidl_string("rild"));
+    radio = ::testing::VtsHalHidlTargetBaseTest::getService<IRadio>(hidl_string("rild"));
     ASSERT_NE(radio, nullptr);
 
     radioRsp = new RadioResponse(*this);
@@ -27,6 +27,12 @@
 
     radioInd = NULL;
     radio->setResponseFunctions(radioRsp, radioInd);
+
+    radio->getIccCardStatus(1);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
+    EXPECT_EQ(1, radioRsp->rspInfo.serial);
+    EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
 }
 
 void RadioHidlTest::TearDown() {
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils.h b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
index 23b6ffa..0429226 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_utils.h
+++ b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 #include <chrono>
 #include <condition_variable>
 #include <mutex>
@@ -27,6 +27,7 @@
 #include <android/hardware/radio/1.0/types.h>
 
 using ::android::hardware::radio::V1_0::ActivityStatsInfo;
+using ::android::hardware::radio::V1_0::AppType;
 using ::android::hardware::radio::V1_0::CardStatus;
 using ::android::hardware::radio::V1_0::Call;
 using ::android::hardware::radio::V1_0::CallForwardInfo;
@@ -39,6 +40,7 @@
 using ::android::hardware::radio::V1_0::DataRegStateResult;
 using ::android::hardware::radio::V1_0::GsmBroadcastSmsConfigInfo;
 using ::android::hardware::radio::V1_0::HardwareConfig;
+using ::android::hardware::radio::V1_0::IccIo;
 using ::android::hardware::radio::V1_0::IccIoResult;
 using ::android::hardware::radio::V1_0::IRadio;
 using ::android::hardware::radio::V1_0::IRadioResponse;
@@ -60,6 +62,7 @@
 using ::android::hardware::radio::V1_0::SendSmsResult;
 using ::android::hardware::radio::V1_0::SetupDataCallResult;
 using ::android::hardware::radio::V1_0::SignalStrength;
+using ::android::hardware::radio::V1_0::SimApdu;
 using ::android::hardware::radio::V1_0::TtyMode;
 using ::android::hardware::radio::V1_0::VoiceRegStateResult;
 
@@ -71,6 +74,7 @@
 #define TIMEOUT_PERIOD 20
 
 class RadioHidlTest;
+extern CardStatus cardStatus;
 
 /* Callback class for radio response */
 class RadioResponse : public IRadioResponse {
@@ -79,7 +83,9 @@
 
 public:
     RadioResponseInfo rspInfo;
-    CardStatus cardStatus;
+    hidl_string imsi;
+    IccIoResult iccIoResult;
+    int channelId;
 
     RadioResponse(RadioHidlTest& parent);
 
@@ -423,7 +429,7 @@
 };
 
 // The main test class for Radio HIDL.
-class RadioHidlTest : public ::testing::Test {
+class RadioHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
 private:
     std::mutex mtx;
     std::condition_variable cv;
@@ -443,6 +449,7 @@
     sp<IRadio> radio;
     sp<RadioResponse> radioRsp;
     sp<IRadioIndication> radioInd;
+
 };
 
 // A class for test environment setup
diff --git a/radio/1.0/vts/functional/radio_response.cpp b/radio/1.0/vts/functional/radio_response.cpp
index b2a74f4..2b4f10f 100644
--- a/radio/1.0/vts/functional/radio_response.cpp
+++ b/radio/1.0/vts/functional/radio_response.cpp
@@ -16,6 +16,8 @@
 
 #include<radio_hidl_hal_utils.h>
 
+CardStatus cardStatus;
+
 RadioResponse::RadioResponse(RadioHidlTest& parent) : parent(parent) {
 }
 
@@ -28,638 +30,667 @@
 }
 
 Return<void> RadioResponse::supplyIccPinForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::supplyIccPukForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::supplyIccPin2ForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
   rspInfo = info;
   parent.notify();
   return Void();
 }
 
 Return<void> RadioResponse::supplyIccPuk2ForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::changeIccPinForAppResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::changeIccPin2ForAppResponse(
-        const RadioResponseInfo& info, int32_t remaining_retries) {
+        const RadioResponseInfo& info, int32_t /*remainingRetries*/) {
     rspInfo = info;
     parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::supplyNetworkDepersonalizationResponse(
-        const RadioResponseInfo& info, int32_t remainingRetries) {
+        const RadioResponseInfo& /*info*/, int32_t /*remainingRetries*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCurrentCallsResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_vec<Call>& calls) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec<Call>& /*calls*/) {
     return Void();
 }
 
-Return<void> RadioResponse::dialResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::dialResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getIMSIForAppResponse(
         const RadioResponseInfo& info, const ::android::hardware::hidl_string& imsi) {
+    rspInfo = info;
+    this->imsi = imsi;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::hangupConnectionResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::hangupWaitingOrBackgroundResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::hangupForegroundResumeBackgroundResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::switchWaitingOrHoldingAndActiveResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::conferenceResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::rejectCallResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getLastCallFailCauseResponse(
-        const RadioResponseInfo& info, const LastCallFailCauseInfo& failCauseInfo) {
+        const RadioResponseInfo& /*info*/, const LastCallFailCauseInfo& /*failCauseInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getSignalStrengthResponse(
-        const RadioResponseInfo& info, const SignalStrength& sig_strength) {
+        const RadioResponseInfo& /*info*/, const SignalStrength& /*sig_strength*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getVoiceRegistrationStateResponse(
-        const RadioResponseInfo& info, const VoiceRegStateResult& voiceRegResponse) {
+        const RadioResponseInfo& /*info*/, const VoiceRegStateResult& /*voiceRegResponse*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getDataRegistrationStateResponse(
-        const RadioResponseInfo& info, const DataRegStateResult& dataRegResponse) {
+        const RadioResponseInfo& /*info*/, const DataRegStateResult& /*dataRegResponse*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getOperatorResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& longName,
-        const ::android::hardware::hidl_string& shortName,
-        const ::android::hardware::hidl_string& numeric) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*longName*/,
+        const ::android::hardware::hidl_string& /*shortName*/,
+        const ::android::hardware::hidl_string& /*numeric*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setRadioPowerResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setRadioPowerResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendDtmfResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::sendDtmfResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendSmsResponse(const RadioResponseInfo& info,
-        const SendSmsResult& sms) {
+Return<void> RadioResponse::sendSmsResponse(const RadioResponseInfo& /*info*/,
+        const SendSmsResult& /*sms*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendSMSExpectMoreResponse(
-        const RadioResponseInfo& info, const SendSmsResult& sms) {
+        const RadioResponseInfo& /*info*/, const SendSmsResult& /*sms*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setupDataCallResponse(
-        const RadioResponseInfo& info, const SetupDataCallResult& dcResponse) {
+        const RadioResponseInfo& /*info*/, const SetupDataCallResult& /*dcResponse*/) {
     return Void();
 }
 
 Return<void> RadioResponse::iccIOForAppResponse(
         const RadioResponseInfo& info, const IccIoResult& iccIo) {
+    rspInfo = info;
+    this->iccIoResult = iccIo;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::sendUssdResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::sendUssdResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::cancelPendingUssdResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::cancelPendingUssdResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& info, int32_t n, int32_t m) {
+Return<void> RadioResponse::getClirResponse(const RadioResponseInfo& /*info*/, int32_t /*n*/,
+        int32_t /*m*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setClirResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setClirResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCallForwardStatusResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CallForwardInfo>&
-        callForwardInfos) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_vec<CallForwardInfo>&
+        /*callForwardInfos*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCallForwardResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCallForwardResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCallWaitingResponse(
-        const RadioResponseInfo& info, bool enable, int32_t serviceClass) {
+        const RadioResponseInfo& /*info*/, bool /*enable*/, int32_t /*serviceClass*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCallWaitingResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCallWaitingResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::acknowledgeLastIncomingGsmSmsResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::acceptCallResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::acceptCallResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::deactivateDataCallResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& info,
-        int32_t response) {
+Return<void> RadioResponse::getFacilityLockForAppResponse(const RadioResponseInfo& /*info*/,
+        int32_t /*response*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& info,
-        int32_t retry) {
+Return<void> RadioResponse::setFacilityLockForAppResponse(const RadioResponseInfo& /*info*/,
+        int32_t /*retry*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setBarringPasswordResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getNetworkSelectionModeResponse(
-        const RadioResponseInfo& info, bool manual) {
+        const RadioResponseInfo& /*info*/, bool /*manual*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setNetworkSelectionModeAutomaticResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setNetworkSelectionModeManualResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setNetworkSelectionModeManualResponse(
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getAvailableNetworksResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<OperatorInfo>& networkInfos) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<OperatorInfo>& /*networkInfos*/) {
     return Void();
 }
 
 Return<void> RadioResponse::startDtmfResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::stopDtmfResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getBasebandVersionResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& version) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*version*/) {
     return Void();
 }
 
-Return<void> RadioResponse::separateConnectionResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::separateConnectionResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setMuteResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setMuteResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& info, bool enable) {
+Return<void> RadioResponse::getMuteResponse(const RadioResponseInfo& /*info*/, bool /*enable*/) {
     return Void();
 }
 
-Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& info, ClipStatus status) {
+Return<void> RadioResponse::getClipResponse(const RadioResponseInfo& /*info*/,
+        ClipStatus /*status*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getDataCallListResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<SetupDataCallResult>& dcResponse) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<SetupDataCallResult>& /*dcResponse*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendOemRilRequestRawResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<uint8_t>& data) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<uint8_t>& /*data*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendOemRilRequestStringsResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& data) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& /*data*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendScreenStateResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setSuppServiceNotificationsResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::writeSmsToSimResponse(
-        const RadioResponseInfo& info, int32_t index) {
+        const RadioResponseInfo& /*info*/, int32_t /*index*/) {
     return Void();
 }
 
 Return<void> RadioResponse::deleteSmsOnSimResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setBandModeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setBandModeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getAvailableBandModesResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<RadioBandMode>& bandModes) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<RadioBandMode>& /*bandModes*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendEnvelopeResponse(const RadioResponseInfo& info,
-        const ::android::hardware::hidl_string& commandResponse) {
+Return<void> RadioResponse::sendEnvelopeResponse(const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_string& /*commandResponse*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::sendTerminalResponseToSimResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::handleStkCallSetupRequestFromSimResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::explicitCallTransferResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::explicitCallTransferResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setPreferredNetworkTypeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getPreferredNetworkTypeResponse(
-        const RadioResponseInfo& info, PreferredNetworkType nw_type) {
+        const RadioResponseInfo& /*info*/, PreferredNetworkType /*nw_type*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getNeighboringCidsResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<NeighboringCell>& cells) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<NeighboringCell>& /*cells*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setLocationUpdatesResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCdmaSubscriptionSourceResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCdmaRoamingPreferenceResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCdmaRoamingPreferenceResponse(
-        const RadioResponseInfo& info, CdmaRoamingType type) {
+        const RadioResponseInfo& /*info*/, CdmaRoamingType /*type*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setTTYModeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setTTYModeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& info, TtyMode mode) {
+Return<void> RadioResponse::getTTYModeResponse(const RadioResponseInfo& /*info*/,
+        TtyMode /*mode*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setPreferredVoicePrivacyResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getPreferredVoicePrivacyResponse(
-        const RadioResponseInfo& info, bool enable) {
+        const RadioResponseInfo& /*info*/, bool /*enable*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::sendCDMAFeatureCodeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::sendBurstDtmfResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendCdmaSmsResponse(
-        const RadioResponseInfo& info, const SendSmsResult& sms) {
+        const RadioResponseInfo& /*info*/, const SendSmsResult& /*sms*/) {
     return Void();
 }
 
 Return<void> RadioResponse::acknowledgeLastIncomingCdmaSmsResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getGsmBroadcastConfigResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& configs) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<GsmBroadcastSmsConfigInfo>& /*configs*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setGsmBroadcastConfigResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setGsmBroadcastActivationResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCdmaBroadcastConfigResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& configs) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<CdmaBroadcastSmsConfigInfo>& /*configs*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCdmaBroadcastConfigResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCdmaBroadcastActivationResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCDMASubscriptionResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& mdn,
-        const ::android::hardware::hidl_string& hSid, const ::android::hardware::hidl_string& hNid,
-        const ::android::hardware::hidl_string& min,
-        const ::android::hardware::hidl_string& prl) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*mdn*/,
+        const ::android::hardware::hidl_string& /*hSid*/,
+        const ::android::hardware::hidl_string& /*hNid*/,
+        const ::android::hardware::hidl_string& /*min*/,
+        const ::android::hardware::hidl_string& /*prl*/) {
     return Void();
 }
 
 Return<void> RadioResponse::writeSmsToRuimResponse(
-        const RadioResponseInfo& info, uint32_t index) {
+        const RadioResponseInfo& /*info*/, uint32_t /*index*/) {
     return Void();
 }
 
 Return<void> RadioResponse::deleteSmsOnRuimResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getDeviceIdentityResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& imei,
-        const ::android::hardware::hidl_string& imeisv, const ::android::hardware::hidl_string& esn,
-        const ::android::hardware::hidl_string& meid) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*imei*/,
+        const ::android::hardware::hidl_string& /*imeisv*/,
+        const ::android::hardware::hidl_string& /*esn*/,
+        const ::android::hardware::hidl_string& /*meid*/) {
     return Void();
 }
 
-Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::exitEmergencyCallbackModeResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getSmscAddressResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& smsc) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*smsc*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setSmscAddressResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setSmscAddressResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::reportSmsMemoryStatusResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::reportStkServiceIsRunningResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCdmaSubscriptionSourceResponse(
-        const RadioResponseInfo& info, CdmaSubscriptionSource source) {
+        const RadioResponseInfo& /*info*/, CdmaSubscriptionSource /*source*/) {
     return Void();
 }
 
 Return<void> RadioResponse::requestIsimAuthenticationResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& response) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*response*/) {
     return Void();
 }
 
 Return<void> RadioResponse::acknowledgeIncomingGsmSmsWithPduResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendEnvelopeWithStatusResponse(
-        const RadioResponseInfo& info, const IccIoResult& iccIo) {
+        const RadioResponseInfo& /*info*/, const IccIoResult& /*iccIo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getVoiceRadioTechnologyResponse(
-        const RadioResponseInfo& info, RadioTechnology rat) {
+        const RadioResponseInfo& /*info*/, RadioTechnology /*rat*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getCellInfoListResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& cellInfo) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<CellInfo>& /*cellInfo*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setCellInfoListRateResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setInitialAttachApnResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getImsRegistrationStateResponse(
-        const RadioResponseInfo& info, bool isRegistered, RadioTechnologyFamily ratFamily) {
+        const RadioResponseInfo& /*info*/, bool /*isRegistered*/,
+        RadioTechnologyFamily /*ratFamily*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendImsSmsResponse(
-        const RadioResponseInfo& info, const SendSmsResult& sms) {
+        const RadioResponseInfo& /*info*/, const SendSmsResult& /*sms*/) {
     return Void();
 }
 
 Return<void> RadioResponse::iccTransmitApduBasicChannelResponse(
         const RadioResponseInfo& info, const IccIoResult& result) {
+    rspInfo = info;
+    this->iccIoResult = result;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::iccOpenLogicalChannelResponse(
         const RadioResponseInfo& info, int32_t channelId,
-        const ::android::hardware::hidl_vec<int8_t>& selectResponse) {
+        const ::android::hardware::hidl_vec<int8_t>& /*selectResponse*/) {
+    rspInfo = info;
+    this->channelId = channelId;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::iccCloseLogicalChannelResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::iccTransmitApduLogicalChannelResponse(
         const RadioResponseInfo& info, const IccIoResult& result) {
+    rspInfo = info;
+    this->iccIoResult = result;
+    parent.notify();
     return Void();
 }
 
 Return<void> RadioResponse::nvReadItemResponse(
-        const RadioResponseInfo& info, const ::android::hardware::hidl_string& result) {
+        const RadioResponseInfo& /*info*/, const ::android::hardware::hidl_string& /*result*/) {
     return Void();
 }
 
-Return<void> RadioResponse::nvWriteItemResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::nvWriteItemResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::nvWriteCdmaPrlResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::nvWriteCdmaPrlResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::nvResetConfigResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::nvResetConfigResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setUiccSubscriptionResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setUiccSubscriptionResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::setDataAllowedResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setDataAllowedResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getHardwareConfigResponse(
-        const RadioResponseInfo& info,
-        const ::android::hardware::hidl_vec<HardwareConfig>& config) {
+        const RadioResponseInfo& /*info*/,
+        const ::android::hardware::hidl_vec<HardwareConfig>& /*config*/) {
     return Void();
 }
 
 Return<void> RadioResponse::requestIccSimAuthenticationResponse(
         const RadioResponseInfo& info, const IccIoResult& result) {
+    rspInfo = info;
+    this->iccIoResult = result;
+    parent.notify();
     return Void();
 }
 
-Return<void> RadioResponse::setDataProfileResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::setDataProfileResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::requestShutdownResponse(const RadioResponseInfo& info) {
+Return<void> RadioResponse::requestShutdownResponse(const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getRadioCapabilityResponse(
-        const RadioResponseInfo& info, const RadioCapability& rc) {
+        const RadioResponseInfo& /*info*/, const RadioCapability& /*rc*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setRadioCapabilityResponse(
-        const RadioResponseInfo& info, const RadioCapability& rc) {
+        const RadioResponseInfo& /*info*/, const RadioCapability& /*rc*/) {
     return Void();
 }
 
 Return<void> RadioResponse::startLceServiceResponse(
-        const RadioResponseInfo& info, const LceStatusInfo& statusInfo) {
+        const RadioResponseInfo& /*info*/, const LceStatusInfo& /*statusInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::stopLceServiceResponse(
-        const RadioResponseInfo& info, const LceStatusInfo& statusInfo) {
+        const RadioResponseInfo& /*info*/, const LceStatusInfo& /*statusInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::pullLceDataResponse(
-        const RadioResponseInfo& info, const LceDataInfo& lceInfo) {
+        const RadioResponseInfo& /*info*/, const LceDataInfo& /*lceInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getModemActivityInfoResponse(
-        const RadioResponseInfo& info, const ActivityStatsInfo& activityInfo) {
+        const RadioResponseInfo& /*info*/, const ActivityStatsInfo& /*activityInfo*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setAllowedCarriersResponse(
-        const RadioResponseInfo& info, int32_t numAllowed) {
+        const RadioResponseInfo& /*info*/, int32_t /*numAllowed*/) {
     return Void();
 }
 
 Return<void> RadioResponse::getAllowedCarriersResponse(
-        const RadioResponseInfo& info, bool allAllowed, const CarrierRestrictions& carriers) {
+        const RadioResponseInfo& /*info*/, bool /*allAllowed*/,
+        const CarrierRestrictions& /*carriers*/) {
     return Void();
 }
 
 Return<void> RadioResponse::sendDeviceStateResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setIndicationFilterResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
 Return<void> RadioResponse::setSimCardPowerResponse(
-        const RadioResponseInfo& info) {
+        const RadioResponseInfo& /*info*/) {
     return Void();
 }
 
-Return<void> RadioResponse::acknowledgeRequest(int32_t serial) {
+Return<void> RadioResponse::acknowledgeRequest(int32_t /*serial*/) {
     return Void();
 }
diff --git a/tests/Android.bp b/tests/Android.bp
index 337e4f4..41043d9 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -3,6 +3,7 @@
     "bar/1.0",
     "bar/1.0/default",
     "baz/1.0",
+    "baz/1.0/default",
     "expression/1.0",
     "foo/1.0",
     "foo/1.0/default",
diff --git a/tests/baz/1.0/default/Android.bp b/tests/baz/1.0/default/Android.bp
new file mode 100644
index 0000000..e160d8a
--- /dev/null
+++ b/tests/baz/1.0/default/Android.bp
@@ -0,0 +1,16 @@
+cc_library_shared {
+    name: "android.hardware.tests.baz@1.0-impl",
+    relative_install_path: "hw",
+    proprietary: true,
+    srcs: [
+        "Baz.cpp",
+    ],
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "android.hardware.tests.baz@1.0",
+        "android.hidl.base@1.0",
+    ],
+}
diff --git a/tests/baz/1.0/default/Baz.cpp b/tests/baz/1.0/default/Baz.cpp
new file mode 100644
index 0000000..8e57fa0
--- /dev/null
+++ b/tests/baz/1.0/default/Baz.cpp
@@ -0,0 +1,519 @@
+#include "Baz.h"
+#include <android-base/logging.h>
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace baz {
+namespace V1_0 {
+namespace implementation {
+
+struct BazCallback : public IBazCallback {
+    Return<void> heyItsMe(const sp<IBazCallback> &cb) override;
+    Return<void> hey() override;
+};
+
+Return<void> BazCallback::heyItsMe(
+        const sp<IBazCallback> &cb) {
+    LOG(INFO) << "SERVER: heyItsMe cb = " << cb.get();
+
+    return Void();
+}
+
+Return<void> BazCallback::hey() {
+    LOG(INFO) << "SERVER: hey";
+
+    return Void();
+}
+
+// TODO(b/35703683) : replace usage of below methods with toString()
+
+static std::string to_string(const IBaz::Foo::Bar &bar);
+static std::string to_string(const IBaz::Foo &foo);
+static std::string to_string(const hidl_string &s);
+static std::string to_string(bool x);
+static std::string to_string(const IBaz::StringMatrix5x3 &M);
+static std::string to_string(const IBaz::StringMatrix3x5 &M);
+
+template<typename T, size_t SIZE>
+static std::string to_string(const hidl_array<T, SIZE> &array);
+
+template<size_t SIZE>
+static std::string to_string(const hidl_array<uint8_t, SIZE> &array);
+
+template<typename T>
+static std::string to_string(const hidl_vec<T> &vec) {
+    std::string out;
+    out = "[";
+    for (size_t i = 0; i < vec.size(); ++i) {
+        if (i > 0) {
+            out += ", ";
+        }
+        out += to_string(vec[i]);
+    }
+    out += "]";
+
+    return out;
+}
+
+template<typename T, size_t SIZE>
+static std::string to_string(const hidl_array<T, SIZE> &array) {
+    std::string out;
+    out = "[";
+    for (size_t i = 0; i < SIZE; ++i) {
+        if (i > 0) {
+            out += ", ";
+        }
+        out += to_string(array[i]);
+    }
+    out += "]";
+
+    return out;
+}
+
+template<size_t SIZE>
+static std::string to_string(const hidl_array<uint8_t, SIZE> &array) {
+    std::string out;
+    for (size_t i = 0; i < SIZE; ++i) {
+        if (i > 0) {
+            out += ":";
+        }
+
+        char tmp[3];
+        sprintf(tmp, "%02x", array[i]);
+
+        out += tmp;
+    }
+
+    return out;
+}
+
+template<typename T, size_t SIZE1, size_t SIZE2>
+static std::string to_string(const hidl_array<T, SIZE1, SIZE2> &array) {
+    std::string out;
+    out = "[";
+    for (size_t i = 0; i < SIZE1; ++i) {
+        if (i > 0) {
+            out += ", ";
+        }
+
+        out += "[";
+        for (size_t j = 0; j < SIZE2; ++j) {
+            if (j > 0) {
+                out += ", ";
+            }
+
+            out += to_string(array[i][j]);
+        }
+        out += "]";
+    }
+    out += "]";
+
+    return out;
+}
+
+static std::string to_string(bool x) {
+    return x ? "true" : "false";
+}
+
+static std::string to_string(const hidl_string &s) {
+    return std::string("'") + s.c_str() + "'";
+}
+
+static std::string to_string(const IBaz::Foo::Bar &bar) {
+    std::string out;
+    out = "Bar(";
+    out += "z = " + to_string(bar.z) + ", ";
+    out += "s = '" + std::string(bar.s.c_str()) + "'";
+    out += ")";
+
+    return out;
+}
+
+static std::string to_string(const IBaz::Foo &foo) {
+    std::string out;
+    out = "Foo(";
+    out += "x = " + to_string(foo.x) + ", ";
+    out += "y = " + to_string(foo.y) + ", ";
+    out += "aaa = " + to_string(foo.aaa);
+    out += ")";
+
+    return out;
+}
+
+static std::string to_string(const IBaz::StringMatrix5x3 &M) {
+    return to_string(M.s);
+}
+
+static std::string to_string(const IBaz::StringMatrix3x5 &M) {
+    return to_string(M.s);
+}
+
+static std::string VectorOfArray_to_string(const IBaz::VectorOfArray &in) {
+    std::string out;
+    out += "VectorOfArray(";
+
+    for (size_t i = 0; i < in.addresses.size(); ++i) {
+        if (i > 0) {
+            out += ", ";
+        }
+
+        for (size_t j = 0; j < 6; ++j) {
+            if (j > 0) {
+                out += ":";
+            }
+
+            char tmp[3];
+            sprintf(tmp, "%02x", in.addresses[i][j]);
+
+            out += tmp;
+        }
+    }
+
+    out += ")";
+
+    return out;
+}
+
+// Methods from ::android::hardware::tests::baz::V1_0::IBase follow.
+Return<void> Baz::someBaseMethod() {
+    LOG(INFO) << "Baz::someBaseMethod";
+
+    return Void();
+}
+
+Return<bool> Baz::someBoolMethod(bool x) {
+    LOG(INFO) << "Baz::someBoolMethod(" << to_string(x) << ")";
+
+    return !x;
+}
+
+Return<void> Baz::someBoolArrayMethod(const hidl_array<bool, 3>& x,
+                                      someBoolArrayMethod_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someBoolArrayMethod("
+        << to_string(x[0])
+        << ", "
+        << to_string(x[1])
+        << ", "
+        << to_string(x[2])
+        << ")";
+
+    hidl_array<bool, 4> out;
+    out[0] = !x[0];
+    out[1] = !x[1];
+    out[2] = !x[2];
+    out[3] = true;
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::someBoolVectorMethod(const hidl_vec<bool>& x, someBoolVectorMethod_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someBoolVectorMethod(" << to_string(x) << ")";
+
+    hidl_vec<bool> out;
+    out.resize(x.size());
+    for (size_t i = 0; i < x.size(); ++i) {
+        out[i] = !x[i];
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::someOtherBaseMethod(const IBase::Foo& foo, someOtherBaseMethod_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someOtherBaseMethod "
+              << to_string(foo);
+
+    _hidl_cb(foo);
+
+    return Void();
+}
+
+Return<void> Baz::someMethodWithFooArrays(const hidl_array<IBase::Foo, 2>& fooInput,
+                                          someMethodWithFooArrays_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someMethodWithFooArrays "
+              << to_string(fooInput);
+
+    hidl_array<IBaz::Foo, 2> fooOutput;
+    fooOutput[0] = fooInput[1];
+    fooOutput[1] = fooInput[0];
+
+    _hidl_cb(fooOutput);
+
+    return Void();
+}
+
+Return<void> Baz::someMethodWithFooVectors(const hidl_vec<IBase::Foo>& fooInput,
+                                           someMethodWithFooVectors_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someMethodWithFooVectors "
+              << to_string(fooInput);
+
+    hidl_vec<IBaz::Foo> fooOutput;
+    fooOutput.resize(2);
+    fooOutput[0] = fooInput[1];
+    fooOutput[1] = fooInput[0];
+
+    _hidl_cb(fooOutput);
+
+    return Void();
+}
+
+Return<void> Baz::someMethodWithVectorOfArray(const IBase::VectorOfArray& in,
+                                              someMethodWithVectorOfArray_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someMethodWithVectorOfArray "
+              << VectorOfArray_to_string(in);
+
+    IBase::VectorOfArray out;
+
+    const size_t n = in.addresses.size();
+    out.addresses.resize(n);
+
+    for (size_t i = 0; i < n; ++i) {
+        out.addresses[i] = in.addresses[n - 1 - i];
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::someMethodTakingAVectorOfArray(const hidl_vec<hidl_array<uint8_t, 6>>& in,
+                                                 someMethodTakingAVectorOfArray_cb _hidl_cb) {
+    LOG(INFO) << "Baz::someMethodTakingAVectorOfArray "
+              << to_string(in);
+
+    const size_t n = in.size();
+
+    hidl_vec<hidl_array<uint8_t, 6> > out;
+    out.resize(n);
+
+    for (size_t i = 0; i < n; ++i) {
+        out[i] = in[n - 1 - i];
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::transpose(const IBase::StringMatrix5x3& in, transpose_cb _hidl_cb) {
+    LOG(INFO) << "Baz::transpose " << to_string(in);
+
+    IBase::StringMatrix3x5 out;
+    for (size_t i = 0; i < 3; ++i) {
+        for (size_t j = 0; j < 5; ++j) {
+            out.s[i][j] = in.s[j][i];
+        }
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::transpose2(const hidl_array<hidl_string, 5, 3>& in, transpose2_cb _hidl_cb) {
+    LOG(INFO) << "Baz::transpose2 " << to_string(in);
+
+    hidl_array<hidl_string, 3, 5> out;
+    for (size_t i = 0; i < 3; ++i) {
+        for (size_t j = 0; j < 5; ++j) {
+            out[i][j] = in[j][i];
+        }
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::takeAMask(IBase::BitField bf,
+                            uint8_t first,
+                            const IBase::MyMask& second,
+                            uint8_t third,
+                            takeAMask_cb _hidl_cb) {
+    _hidl_cb(bf, bf | first, second.value & bf, (bf | bf) & third);
+    return Void();
+}
+
+// Methods from ::android::hardware::tests::baz::V1_0::IBaz follow.
+
+Return<void> Baz::doThis(float param) {
+    LOG(INFO) << "Baz::doThis(" << param << ")";
+
+    return Void();
+}
+
+Return<int32_t> Baz::doThatAndReturnSomething(int64_t param) {
+    LOG(INFO) << "Baz::doThatAndReturnSomething(" << param << ")";
+
+    return 666;
+}
+
+Return<double> Baz::doQuiteABit(int32_t a, int64_t b, float c, double d) {
+    LOG(INFO) << "Baz::doQuiteABit("
+              << a
+              << ", "
+              << b
+              << ", "
+              << c
+              << ", "
+              << d
+              << ")";
+
+    return 666.5;
+}
+
+Return<void> Baz::doSomethingElse(const hidl_array<int32_t, 15>& param,
+                                  doSomethingElse_cb _hidl_cb) {
+    LOG(INFO) << "Baz::doSomethingElse(...)";
+
+    hidl_array<int32_t, 32> result;
+    for (size_t i = 0; i < 15; ++i) {
+        result[i] = 2 * param[i];
+        result[15 + i] = param[i];
+    }
+    result[30] = 1;
+    result[31] = 2;
+
+    _hidl_cb(result);
+
+    return Void();
+}
+
+Return<void> Baz::doStuffAndReturnAString(doStuffAndReturnAString_cb _hidl_cb) {
+    LOG(INFO) << "doStuffAndReturnAString";
+
+    hidl_string s;
+    s = "Hello, world!";
+
+    _hidl_cb(s);
+
+    return Void();
+}
+
+Return<void> Baz::mapThisVector(const hidl_vec<int32_t>& param, mapThisVector_cb _hidl_cb) {
+    LOG(INFO) << "mapThisVector";
+
+    hidl_vec<int32_t> out;
+    out.resize(param.size());
+    for (size_t i = 0; i < param.size(); ++i) {
+        out[i] = param[i] * 2;
+    }
+
+    _hidl_cb(out);
+
+    return Void();
+}
+
+Return<void> Baz::callMe(const sp<IBazCallback>& cb) {
+    LOG(INFO) << "callMe " << cb.get();
+
+    if (cb != NULL) {
+        sp<IBazCallback> my_cb = new BazCallback;
+        cb->heyItsMe(my_cb);
+    }
+
+    return Void();
+}
+
+Return<void> Baz::callMeLater(const sp<IBazCallback>& cb) {
+    LOG(INFO) << "callMeLater " << cb.get();
+
+    mStoredCallback = cb;
+
+    return Void();
+}
+
+Return<void> Baz::iAmFreeNow() {
+    if (mStoredCallback != nullptr) {
+        mStoredCallback->hey();
+    }
+    return Void();
+}
+
+Return<void> Baz::dieNow() {
+    exit(1);
+    return Void();
+}
+
+Return<IBaz::SomeEnum> Baz::useAnEnum(IBaz::SomeEnum zzz) {
+    LOG(INFO) << "useAnEnum " << (int)zzz;
+
+    return SomeEnum::goober;
+}
+
+Return<void> Baz::haveSomeStrings(const hidl_array<hidl_string, 3>& array,
+                                  haveSomeStrings_cb _hidl_cb) {
+    LOG(INFO) << "haveSomeStrings("
+              << to_string(array)
+              << ")";
+
+    hidl_array<hidl_string, 2> result;
+    result[0] = "Hello";
+    result[1] = "World";
+
+    _hidl_cb(result);
+
+    return Void();
+}
+
+Return<void> Baz::haveAStringVec(const hidl_vec<hidl_string>& vector,
+                                 haveAStringVec_cb _hidl_cb) {
+    LOG(INFO) << "haveAStringVec(" << to_string(vector) << ")";
+
+    hidl_vec<hidl_string> result;
+    result.resize(2);
+
+    result[0] = "Hello";
+    result[1] = "World";
+
+    _hidl_cb(result);
+
+    return Void();
+}
+
+Return<void> Baz::returnABunchOfStrings(returnABunchOfStrings_cb _hidl_cb) {
+    hidl_string eins; eins = "Eins";
+    hidl_string zwei; zwei = "Zwei";
+    hidl_string drei; drei = "Drei";
+    _hidl_cb(eins, zwei, drei);
+
+    return Void();
+}
+
+Return<uint8_t> Baz::returnABitField() {
+    return 0;
+}
+
+Return<uint32_t> Baz::size(uint32_t size) {
+    return size;
+}
+
+Return<void> Baz::getNestedStructs(getNestedStructs_cb _hidl_cb) {
+    int size = 5;
+    hidl_vec<IBaz::NestedStruct> result;
+    result.resize(size);
+    for (int i = 0; i < size; i++) {
+        result[i].a = i;
+        if (i == 1) {
+            result[i].matrices.resize(6);
+        }
+    }
+    _hidl_cb(result);
+    return Void();
+}
+// Methods from ::android::hidl::base::V1_0::IBase follow.
+
+IBaz* HIDL_FETCH_IBaz(const char* /* name */) {
+    return new Baz();
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace baz
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android
diff --git a/tests/baz/1.0/default/Baz.h b/tests/baz/1.0/default/Baz.h
new file mode 100644
index 0000000..ceb3035
--- /dev/null
+++ b/tests/baz/1.0/default/Baz.h
@@ -0,0 +1,92 @@
+#ifndef ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
+#define ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
+
+#include <android/hardware/tests/baz/1.0/IBaz.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+
+namespace android {
+namespace hardware {
+namespace tests {
+namespace baz {
+namespace V1_0 {
+namespace implementation {
+
+// using ::android::hardware::tests::baz::V1_0::IBase;
+using ::android::hardware::tests::baz::V1_0::IBaz;
+using ::android::hardware::tests::baz::V1_0::IBazCallback;
+using ::android::hidl::base::V1_0::DebugInfo;
+using ::android::hidl::base::V1_0::IBase;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_memory;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+struct Baz : public IBaz {
+    // Methods from ::android::hardware::tests::baz::V1_0::IBase follow.
+    Return<void> someBaseMethod() override;
+    Return<bool> someBoolMethod(bool x) override;
+    Return<void> someBoolArrayMethod(const hidl_array<bool, 3>& x,
+                                     someBoolArrayMethod_cb _hidl_cb) override;
+    Return<void> someBoolVectorMethod(const hidl_vec<bool>& x,
+                                      someBoolVectorMethod_cb _hidl_cb) override;
+    Return<void> someOtherBaseMethod(const IBase::Foo& foo,
+                                     someOtherBaseMethod_cb _hidl_cb) override;
+    Return<void> someMethodWithFooArrays(const hidl_array<IBase::Foo, 2>& fooInput,
+                                         someMethodWithFooArrays_cb _hidl_cb) override;
+    Return<void> someMethodWithFooVectors(const hidl_vec<IBase::Foo>& fooInput,
+                                          someMethodWithFooVectors_cb _hidl_cb) override;
+    Return<void> someMethodWithVectorOfArray(const IBase::VectorOfArray& in,
+                                             someMethodWithVectorOfArray_cb _hidl_cb) override;
+    Return<void> someMethodTakingAVectorOfArray(const hidl_vec<hidl_array<uint8_t, 6>>& in,
+                                                someMethodTakingAVectorOfArray_cb _hidl_cb) override;
+    Return<void> transpose(const IBase::StringMatrix5x3& in,
+                           transpose_cb _hidl_cb) override;
+    Return<void> transpose2(const hidl_array<hidl_string, 5, 3>& in,
+                            transpose2_cb _hidl_cb) override;
+    Return<void> takeAMask(IBase::BitField bf,
+                           uint8_t first,
+                           const IBase::MyMask& second,
+                           uint8_t third,
+                           takeAMask_cb _hidl_cb) override;
+
+    // Methods from ::android::hardware::tests::baz::V1_0::IBaz follow.
+    Return<void> doThis(float param) override;
+    Return<int32_t> doThatAndReturnSomething(int64_t param) override;
+    Return<double> doQuiteABit(int32_t a, int64_t b, float c, double d) override;
+    Return<void> doSomethingElse(const hidl_array<int32_t, 15>& param,
+                                 doSomethingElse_cb _hidl_cb) override;
+    Return<void> doStuffAndReturnAString(doStuffAndReturnAString_cb _hidl_cb) override;
+    Return<void> mapThisVector(const hidl_vec<int32_t>& param, mapThisVector_cb _hidl_cb) override;
+    Return<void> callMe(const sp<IBazCallback>& cb) override;
+    Return<void> callMeLater(const sp<IBazCallback>& cb) override;
+    Return<void> iAmFreeNow() override;
+    Return<void> dieNow() override;
+    Return<IBaz::SomeEnum> useAnEnum(IBaz::SomeEnum zzz) override;
+    Return<void> haveSomeStrings(const hidl_array<hidl_string, 3>& array,
+                                 haveSomeStrings_cb _hidl_cb) override;
+    Return<void> haveAStringVec(const hidl_vec<hidl_string>& vector,
+                                haveAStringVec_cb _hidl_cb) override;
+    Return<void> returnABunchOfStrings(returnABunchOfStrings_cb _hidl_cb) override;
+    Return<uint8_t> returnABitField() override;
+    Return<uint32_t> size(uint32_t size) override;
+    Return<void> getNestedStructs(getNestedStructs_cb _hidl_cb) override;
+
+    // Methods from ::android::hidl::base::V1_0::IBase follow.
+ private:
+    sp<IBazCallback> mStoredCallback;
+};
+
+extern "C" IBaz* HIDL_FETCH_IBaz(const char* name);
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace baz
+}  // namespace tests
+}  // namespace hardware
+}  // namespace android
+
+#endif  // ANDROID_HARDWARE_TESTS_BAZ_V1_0_BAZ_H
diff --git a/wifi/1.0/IWifiChip.hal b/wifi/1.0/IWifiChip.hal
index b0598a4..611c449 100644
--- a/wifi/1.0/IWifiChip.hal
+++ b/wifi/1.0/IWifiChip.hal
@@ -629,6 +629,19 @@
   forceDumpToDebugRingBuffer(string ringName) generates (WifiStatus status);
 
   /**
+   * API to stop the debug data collection for all ring buffers.
+   *
+   * @return status WifiStatus of the operation.
+   *         Possible status codes:
+   *         |WifiStatusCode.SUCCESS|,
+   *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
+   *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+   *         |WifiStatusCode.NOT_AVAILABLE|,
+   *         |WifiStatusCode.UNKNOWN|
+   */
+  stopLoggingToDebugRingBuffer() generates (WifiStatus status);
+
+  /**
    * API to retrieve the wifi wake up reason stats for debugging.
    * The driver is expected to start maintaining these stats once the chip
    * is configured using |configureChip|. These stats must be reset whenever
diff --git a/wifi/1.0/IWifiStaIfaceEventCallback.hal b/wifi/1.0/IWifiStaIfaceEventCallback.hal
index e8df4c2..e51ea6d 100644
--- a/wifi/1.0/IWifiStaIfaceEventCallback.hal
+++ b/wifi/1.0/IWifiStaIfaceEventCallback.hal
@@ -31,9 +31,12 @@
    * |StaBackgroundScanBucketParameters.eventReportScheme|.
    *
    * @param cmdId command ID corresponding to the request.
+   * @param bucketsScanned Bitset where each bit indicates if the bucket with
+   *        that index (starting at 0) was scanned.
    * @parm result Full scan result for an AP.
    */
-  oneway onBackgroundFullScanResult(CommandId cmdId, StaScanResult result);
+  oneway onBackgroundFullScanResult(
+      CommandId cmdId, uint32_t bucketsScanned, StaScanResult result);
 
   /**
    * Called when the |StaBackgroundScanBucketParameters.eventReportScheme| flags
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index c7b8c41..82364cb 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -338,7 +338,6 @@
       hidl_scan_params.reportThresholdPercent;
   legacy_scan_params->report_threshold_num_scans =
       hidl_scan_params.reportThresholdNumScans;
-  // TODO(b/33194311): Expose these max limits in the HIDL interface.
   if (hidl_scan_params.buckets.size() > MAX_BUCKETS) {
     return false;
   }
@@ -366,7 +365,6 @@
             convertHidlGscanReportEventFlagToLegacy(flag);
       }
     }
-    // TODO(b/33194311): Expose these max limits in the HIDL interface.
     if (hidl_bucket_spec.frequencies.size() > MAX_CHANNELS) {
       return false;
     }
@@ -950,7 +948,7 @@
         hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
   legacy_request->recv_indication_cfg |=
         hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
-  legacy_request->cipher_type = hidl_request.baseConfigs.supportedCipherTypes;
+  legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.cipherType;
   legacy_request->pmk_len = hidl_request.baseConfigs.pmk.size();
   if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanPublishRequestToLegacy: pmk_len too large";
@@ -973,6 +971,8 @@
   legacy_request->range_report = legacy_hal::NAN_DISABLE_RANGE_REPORT;
   legacy_request->publish_type = (legacy_hal::NanPublishType) hidl_request.publishType;
   legacy_request->tx_type = (legacy_hal::NanTxType) hidl_request.txType;
+  legacy_request->service_responder_policy = hidl_request.autoAcceptDataPathRequests ?
+        legacy_hal::NAN_SERVICE_ACCEPT_POLICY_ALL : legacy_hal::NAN_SERVICE_ACCEPT_POLICY_NONE;
 
   return true;
 }
@@ -1041,7 +1041,7 @@
         hidl_request.baseConfigs.disableMatchExpirationIndication ? 0x2 : 0x0;
   legacy_request->recv_indication_cfg |=
         hidl_request.baseConfigs.disableFollowupReceivedIndication ? 0x4 : 0x0;
-  legacy_request->cipher_type = hidl_request.baseConfigs.supportedCipherTypes;
+  legacy_request->cipher_type = (unsigned int) hidl_request.baseConfigs.cipherType;
   legacy_request->pmk_len = hidl_request.baseConfigs.pmk.size();
   if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanSubscribeRequestToLegacy: pmk_len too large";
@@ -1230,14 +1230,15 @@
         legacy_hal::NAN_DP_CONFIG_SECURITY : legacy_hal::NAN_DP_CONFIG_NO_SECURITY;
   legacy_request->app_info.ndp_app_info_len = hidl_request.appInfo.size();
   if (legacy_request->app_info.ndp_app_info_len > NAN_DP_MAX_APP_INFO_LEN) {
-    LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: ndp_app_info_len to large";
+    LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: ndp_app_info_len too large";
     return false;
   }
   memcpy(legacy_request->app_info.ndp_app_info, hidl_request.appInfo.data(),
         legacy_request->app_info.ndp_app_info_len);
-  legacy_request->cipher_type = hidl_request.supportedCipherTypes;
+  legacy_request->cipher_type = (unsigned int) hidl_request.cipherType;
   legacy_request->pmk_len = hidl_request.pmk.size();
   if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
+    LOG(ERROR) << "convertHidlNanDataPathInitiatorRequestToLegacy: pmk_len too large";
     return false;
   }
   memcpy(legacy_request->pmk, hidl_request.pmk.data(), legacy_request->pmk_len);
@@ -1267,7 +1268,7 @@
   }
   memcpy(legacy_request->app_info.ndp_app_info, hidl_request.appInfo.data(),
         legacy_request->app_info.ndp_app_info_len);
-  legacy_request->cipher_type = hidl_request.supportedCipherTypes;
+  legacy_request->cipher_type = (unsigned int) hidl_request.cipherType;
   legacy_request->pmk_len = hidl_request.pmk.size();
   if (legacy_request->pmk_len > NAN_PMK_INFO_LEN) {
     LOG(ERROR) << "convertHidlNanDataPathIndicationResponseToLegacy: pmk_len too large";
@@ -1337,7 +1338,7 @@
   hidl_ind->matchOccuredInBeaconFlag = legacy_ind.match_occured_flag == 1;
   hidl_ind->outOfResourceFlag = legacy_ind.out_of_resource_flag == 1;
   hidl_ind->rssiValue = legacy_ind.rssi_value;
-  hidl_ind->peerSupportedCipherTypes = legacy_ind.peer_cipher_type;
+  hidl_ind->peerCipherType = (NanCipherSuiteType) legacy_ind.peer_cipher_type;
   hidl_ind->peerRequiresSecurityEnabledInNdp =
         legacy_ind.peer_sdea_params.security_cfg == legacy_hal::NAN_DP_CONFIG_SECURITY;
   hidl_ind->peerRequiresRanging =
diff --git a/wifi/1.0/default/wifi_chip.cpp b/wifi/1.0/default/wifi_chip.cpp
index 6aeedf8..6f980c0 100644
--- a/wifi/1.0/default/wifi_chip.cpp
+++ b/wifi/1.0/default/wifi_chip.cpp
@@ -317,6 +317,14 @@
                          ring_name);
 }
 
+Return<void> WifiChip::stopLoggingToDebugRingBuffer(
+    stopLoggingToDebugRingBuffer_cb hidl_status_cb) {
+  return validateAndCall(this,
+                         WifiStatusCode::ERROR_WIFI_CHIP_INVALID,
+                         &WifiChip::stopLoggingToDebugRingBufferInternal,
+                         hidl_status_cb);
+}
+
 Return<void> WifiChip::getDebugHostWakeReasonStats(
     getDebugHostWakeReasonStats_cb hidl_status_cb) {
   return validateAndCall(this,
@@ -735,6 +743,12 @@
   return createWifiStatusFromLegacyError(legacy_status);
 }
 
+WifiStatus WifiChip::stopLoggingToDebugRingBufferInternal() {
+  legacy_hal::wifi_error legacy_status =
+      legacy_hal_.lock()->deregisterRingBufferCallbackHandler();
+  return createWifiStatusFromLegacyError(legacy_status);
+}
+
 std::pair<WifiStatus, WifiDebugHostWakeReasonStats>
 WifiChip::getDebugHostWakeReasonStatsInternal() {
   legacy_hal::wifi_error legacy_status;
diff --git a/wifi/1.0/default/wifi_chip.h b/wifi/1.0/default/wifi_chip.h
index e1c2344..406938c 100644
--- a/wifi/1.0/default/wifi_chip.h
+++ b/wifi/1.0/default/wifi_chip.h
@@ -119,6 +119,8 @@
   Return<void> forceDumpToDebugRingBuffer(
       const hidl_string& ring_name,
       forceDumpToDebugRingBuffer_cb hidl_status_cb) override;
+  Return<void> stopLoggingToDebugRingBuffer(
+      stopLoggingToDebugRingBuffer_cb hidl_status_cb) override;
   Return<void> getDebugHostWakeReasonStats(
       getDebugHostWakeReasonStats_cb hidl_status_cb) override;
   Return<void> enableDebugErrorAlerts(
@@ -170,6 +172,7 @@
       uint32_t max_interval_in_sec,
       uint32_t min_data_size_in_bytes);
   WifiStatus forceDumpToDebugRingBufferInternal(const hidl_string& ring_name);
+  WifiStatus stopLoggingToDebugRingBufferInternal();
   std::pair<WifiStatus, WifiDebugHostWakeReasonStats>
   getDebugHostWakeReasonStatsInternal();
   WifiStatus enableDebugErrorAlertsInternal(bool enable);
diff --git a/wifi/1.0/default/wifi_nan_iface.cpp b/wifi/1.0/default/wifi_nan_iface.cpp
index 68be2a7..6977fc0 100644
--- a/wifi/1.0/default/wifi_nan_iface.cpp
+++ b/wifi/1.0/default/wifi_nan_iface.cpp
@@ -166,6 +166,7 @@
             LOG(ERROR) << "Failed to invoke the callback";
           }
         }
+        break;
     }
     case legacy_hal::NAN_DP_END: {
         for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
diff --git a/wifi/1.0/default/wifi_sta_iface.cpp b/wifi/1.0/default/wifi_sta_iface.cpp
index 0c84102..626b195 100644
--- a/wifi/1.0/default/wifi_sta_iface.cpp
+++ b/wifi/1.0/default/wifi_sta_iface.cpp
@@ -415,7 +415,7 @@
   const auto& on_full_result_callback = [weak_ptr_this](
       legacy_hal::wifi_request_id id,
       const legacy_hal::wifi_scan_result* result,
-      uint32_t /* buckets_scanned */) {
+      uint32_t buckets_scanned) {
     const auto shared_ptr_this = weak_ptr_this.promote();
     if (!shared_ptr_this.get() || !shared_ptr_this->isValid()) {
       LOG(ERROR) << "Callback invoked on an invalid object";
@@ -428,7 +428,8 @@
       return;
     }
     for (const auto& callback : shared_ptr_this->getEventCallbacks()) {
-      if (!callback->onBackgroundFullScanResult(id, hidl_scan_result).isOk()) {
+      if (!callback->onBackgroundFullScanResult(
+              id, buckets_scanned, hidl_scan_result).isOk()) {
         LOG(ERROR) << "Failed to invoke onBackgroundFullScanResult callback";
       }
     }
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index a843ce8..83e6660 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -306,6 +306,15 @@
 };
 
 /**
+ * Max limits for background scan.
+ */
+enum StaScanLimits : uint32_t {
+  MAX_CHANNELS = 16,
+  MAX_BUCKETS = 16,
+  MAX_AP_CACHE_PER_SCAN = 32
+};
+
+/**
  * Background Scan parameters per bucket that can be specified in background
  * scan requests.
  */
@@ -318,6 +327,7 @@
   /**
    * Channel frequencies (in Mhz) to scan if |band| is set to
    * |BAND_UNSPECIFIED|.
+   * Max length: |StaScanLimits.MAX_CHANNELS|.
    */
   vec<WifiChannelInMhz> frequencies;
   /**
@@ -361,6 +371,7 @@
   /**
    * Maximum number of APs that must be stored for each scan. If the maximum
    * is reached the highest RSSI results must be returned.
+   * Max length: |StaScanLimits.MAX_AP_CACHE_PER_SCAN|.
    */
   uint32_t maxApPerScan;
   /**
@@ -374,6 +385,7 @@
   uint32_t reportThresholdNumScans;
   /**
    * List of buckets to be scheduled.
+   * Max length: |StaScanLimits.MAX_BUCKETS|.
    */
   vec<StaBackgroundScanBucketParameters> buckets;
 };
@@ -506,8 +518,8 @@
    */
   bitfield<StaScanDataFlagMask> flags;
   /**
-   * Bitset where each bit indicates if the bucket with that index was
-   * scanned.
+   * Bitset where each bit indicates if the bucket with that index (starting at
+   * 0) was scanned.
    */
   uint32_t bucketsScanned;
   /**
@@ -877,6 +889,7 @@
  * Cipher suite flags.
  */
 enum NanCipherSuiteType : uint32_t {
+  NONE = 0, // No (open) security
   SHARED_KEY_128_MASK = 1 << 0, // NCS-SK-128
   SHARED_KEY_256_MASK = 1 << 1  // NCS-SK-256
 };
@@ -991,13 +1004,15 @@
    */
   bool disableFollowupReceivedIndication;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session.
+   * Cipher type for data-paths constructed in the context of this discovery session. Must be
+   * specified as |NanCipherSuiteType.NONE| if no |pmk| is provided.
    */
-  bitfield<NanCipherSuiteType> supportedCipherTypes;
+  NanCipherSuiteType cipherType;
   /**
    * Optional Pairwise Master Key (PMK) for data-paths constructed in the context of this discovery
    * session. A PMK can also be provided during the actual construction of the data-path (which
-   * allows for unique PMKs for each data-path).
+   * allows for unique PMKs for each data-path). The |cipherType| must be specified if a PMK is
+   * provided.
    * Max length: 32
    * Ref: IEEE 802.11i
    */
@@ -1059,6 +1074,13 @@
    * peer.
    */
   NanTxType txType;
+  /**
+   * Specifies whether data-path requests |IWifiNanIfaceEventCallback.eventDataPathRequest| (in
+   * the context of this discovery session) are automatically accepted (if true) - in which case
+   * the Responder must not call the |IWifiNanIface.respondToDataPathIndicationRequest| method and
+   * the device must automatically accept the data-path request and complete the negotiation.
+   */
+  bool autoAcceptDataPathRequests;
 };
 
 /**
@@ -1199,11 +1221,13 @@
    */
   vec<uint8_t> appInfo;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session.
+   * Cipher type for the data-path being requested. Must be specified as |NanCipherSuiteType.NONE|
+   * if no |pmk| is provided.
    */
-  bitfield<NanCipherSuiteType> supportedCipherTypes;
+  NanCipherSuiteType cipherType;
   /**
    * Pairwise Master Key (PMK) for the data-path being requested (if |securityRequired| is true).
+   * The |cipherType| must be specified if a PMK is provided.
    * Max length: 32
    * Ref: IEEE 802.11i
    */
@@ -1243,11 +1267,13 @@
    */
   vec<uint8_t> appInfo;
   /**
-   * Cipher types supported in data-paths constructed in the context of this discovery session.
+   * Cipher type for the data-path being negotiated. Must be specified as |NanCipherSuiteType.NONE|
+   * if no |pmk| is provided.
    */
-  bitfield<NanCipherSuiteType> supportedCipherTypes;
+  NanCipherSuiteType cipherType;
   /**
    * Pairwise Master Key (PMK) for the data-path being negotiated (if |securityRequired| is true).
+   * The |cipherType| must be specified if a PMK is provided.
    * Max length: 32
    */
   vec<uint8_t> pmk;
@@ -1374,13 +1400,14 @@
    */
   uint8_t rssiValue;
   /**
-   * Cipher types supported by the peer for data-paths constructed in the context of this discovery
-   * session.
+   * Cipher type for data-paths constructed in the context of this discovery session. Valid if
+   * |peerRequiresSecurityEnabledInNdp| is true.
    */
-  bitfield<NanCipherSuiteType> peerSupportedCipherTypes;
+  NanCipherSuiteType peerCipherType;
   /**
    * Indicates whether or not the peer requires security enabled in any data-path (NDP) constructed
-   * in the context of this discovery session.
+   * in the context of this discovery session. The |cipherType| specifies the cipher type for such
+   * data-paths.
    * NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Security Required
    */
   bool peerRequiresSecurityEnabledInNdp;
diff --git a/wifi/1.0/vts/functional/Android.bp b/wifi/1.0/vts/functional/Android.bp
index dc36139..de917c0 100644
--- a/wifi/1.0/vts/functional/Android.bp
+++ b/wifi/1.0/vts/functional/Android.bp
@@ -16,7 +16,6 @@
 
 cc_test {
     name: "VtsHalWifiV1_0TargetTest",
-    gtest: true,
     srcs: [
         "VtsHalWifiV1_0TargetTest.cpp",
         "wifi_ap_iface_hidl_test.cpp",
@@ -38,7 +37,7 @@
         "libutils",
         "android.hardware.wifi@1.0",
     ],
-    static_libs: ["libgtest"],
+    static_libs: ["VtsHalHidlTargetBaseTest"],
     cflags: [
         "-O0",
         "-g",
diff --git a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
index b33b5eb..51512a1 100644
--- a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
+++ b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_test_utils.h"
 
diff --git a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
index dc7b0b9..dd3df56 100644
--- a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiApIface.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all AP Iface HIDL interface tests.
  */
-class WifiApIfaceHidlTest : public ::testing::Test {
+class WifiApIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
index b6ecd8b..3c2ba9a 100644
--- a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiChip.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all Wifi chip HIDL interface tests.
  */
-class WifiChipHidlTest : public ::testing::Test {
+class WifiChipHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_hidl_call_util.h b/wifi/1.0/vts/functional/wifi_hidl_call_util.h
index 03200a0..4797423 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_call_util.h
+++ b/wifi/1.0/vts/functional/wifi_hidl_call_util.h
@@ -21,7 +21,7 @@
 #include <type_traits>
 #include <utility>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 namespace {
 namespace detail {
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_hidl_test.cpp
index 3e350e5..2f4e01e 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifi.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all root Wifi HIDL interface tests.
  */
-class WifiHidlTest : public ::testing::Test {
+class WifiHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
index 8f34a88..9042075 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_call_util.h"
 #include "wifi_hidl_test_utils.h"
@@ -43,7 +43,7 @@
 void startFramework() { ASSERT_EQ(std::system("svc wifi enable"), 0); }
 
 sp<IWifi> getWifi() {
-    sp<IWifi> wifi = IWifi::getService();
+    sp<IWifi> wifi = ::testing::VtsHalHidlTargetBaseTest::getService<IWifi>();
     return wifi;
 }
 
diff --git a/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
index a8be48c..eb482c9 100644
--- a/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiNanIface.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all NAN Iface HIDL interface tests.
  */
-class WifiNanIfaceHidlTest : public ::testing::Test {
+class WifiNanIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
index e29226d..d53096c 100644
--- a/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiP2pIface.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all P2P Iface HIDL interface tests.
  */
-class WifiP2pIfaceHidlTest : public ::testing::Test {
+class WifiP2pIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
index 7aee761..4d08919 100644
--- a/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiRttController.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all RTT controller HIDL interface tests.
  */
-class WifiRttControllerHidlTest : public ::testing::Test {
+class WifiRttControllerHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
index 770763c..4457487 100644
--- a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
 
 #include <android/hardware/wifi/1.0/IWifiStaIface.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "wifi_hidl_test_utils.h"
 
@@ -28,7 +28,7 @@
 /**
  * Fixture to use for all STA Iface HIDL interface tests.
  */
-class WifiStaIfaceHidlTest : public ::testing::Test {
+class WifiStaIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
    public:
     virtual void SetUp() override {}
 
diff --git a/wifi/supplicant/1.0/vts/functional/Android.mk b/wifi/supplicant/1.0/vts/functional/Android.mk
index 5d7c763..93e5250 100644
--- a/wifi/supplicant/1.0/vts/functional/Android.mk
+++ b/wifi/supplicant/1.0/vts/functional/Android.mk
@@ -37,6 +37,6 @@
     libwifi-system
 LOCAL_STATIC_LIBRARIES := \
     libgmock \
-    libgtest
+    VtsHalHidlTargetBaseTest
 include $(BUILD_NATIVE_TEST)
 
diff --git a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
index 81a2947..802d11c 100644
--- a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
+++ b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
index 9922447..eb02445 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
index 2f3405d..3f7ee1a 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
@@ -15,7 +15,7 @@
  */
 
 #include <android-base/logging.h>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include <hidl/HidlTransportSupport.h>
 #include <android/hidl/manager/1.0/IServiceManager.h>
@@ -174,7 +174,7 @@
 }
 
 sp<ISupplicant> getSupplicant() {
-    return ISupplicant::getService(kSupplicantServiceName);
+    return getService<ISupplicant>(kSupplicantServiceName);
 }
 
 sp<ISupplicantStaIface> getSupplicantStaIface() {
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
index 968d4c9..200845b 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
index 45cc6bc..a1f5513 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "supplicant_hidl_test_utils.h"
 
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
index 8c42a22..e2572c2 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
@@ -16,7 +16,7 @@
 
 #include <android-base/logging.h>
 
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetBaseTest.h>
 
 #include "supplicant_hidl_test_utils.h"