Merge "Use old version of IGBP and bufferpool"
diff --git a/bluetooth/OWNERS b/bluetooth/OWNERS
index a143df2..3fa1def 100644
--- a/bluetooth/OWNERS
+++ b/bluetooth/OWNERS
@@ -1 +1 @@
-per-file */vts/* = siyuanh@google.com, mylesgw@google.com, jpawlowski@google.com, apanicke@google.com, stng@google.com, hsz@google.com
+per-file **/vts/** = siyuanh@google.com, mylesgw@google.com, jpawlowski@google.com, apanicke@google.com, stng@google.com, hsz@google.com
diff --git a/drm/1.2/Android.bp b/drm/1.2/Android.bp
new file mode 100644
index 0000000..66a1bd8
--- /dev/null
+++ b/drm/1.2/Android.bp
@@ -0,0 +1,26 @@
+// This file is autogenerated by hidl-gen -Landroidbp.
+
+hidl_interface {
+    name: "android.hardware.drm@1.2",
+    root: "android.hardware",
+    vndk: {
+        enabled: true,
+    },
+    srcs: [
+        "types.hal",
+        "ICryptoFactory.hal",
+        "IDrmFactory.hal",
+        "IDrmPlugin.hal",
+    ],
+    interfaces: [
+        "android.hardware.drm@1.0",
+        "android.hardware.drm@1.1",
+        "android.hidl.base@1.0",
+    ],
+    types: [
+        "KeySetId",
+        "OfflineLicenseState",
+    ],
+    gen_java: false,
+}
+
diff --git a/drm/1.2/ICryptoFactory.hal b/drm/1.2/ICryptoFactory.hal
new file mode 100644
index 0000000..c4a9b4b
--- /dev/null
+++ b/drm/1.2/ICryptoFactory.hal
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.drm@1.2;
+
+import @1.1::ICryptoFactory;
+
+/**
+ * ICryptoFactory is the main entry point for interacting with a vendor's
+ * crypto HAL to create crypto plugins. Crypto plugins create crypto sessions
+ * which are used by a codec to decrypt protected video content.
+ *
+ * The 1.2 factory must always create 1.2 ICryptoPlugin interfaces, which are
+ * returned via the 1.0 createPlugin method.
+ *
+ * To use 1.2 features the caller must cast the returned interface to a
+ * 1.2 HAL, using V1_2::IDrmPlugin::castFrom().
+ *
+ * The ICryptoFactory hal is required because all top-level interfaces
+ * have to be updated in a minor uprev.
+ */
+interface ICryptoFactory extends @1.1::ICryptoFactory {
+};
diff --git a/drm/1.2/IDrmFactory.hal b/drm/1.2/IDrmFactory.hal
new file mode 100644
index 0000000..c94e4bb
--- /dev/null
+++ b/drm/1.2/IDrmFactory.hal
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.drm@1.2;
+
+import @1.1::IDrmFactory;
+import @1.1::IDrmPlugin;
+
+/**
+ * IDrmFactory is the main entry point for interacting with a vendor's
+ * drm HAL to create drm plugin instances. A drm plugin instance
+ * creates drm sessions which are used to obtain keys for a crypto
+ * session so it can decrypt protected video content.
+ *
+ * The 1.2 factory must always create 1.2 IDrmPlugin interfaces, which are
+ * returned via the 1.0 createPlugin method.
+ *
+ * To use 1.2 features the caller must cast the returned interface to a
+ * 1.2 HAL, using V1_2::IDrmPlugin::castFrom().
+ *
+ * The IDrmFactory hal is required because all top-level interfaces
+ * have to be updated in a minor uprev.
+ */
+
+interface IDrmFactory extends @1.1::IDrmFactory {
+};
diff --git a/drm/1.2/IDrmPlugin.hal b/drm/1.2/IDrmPlugin.hal
new file mode 100644
index 0000000..88338d6
--- /dev/null
+++ b/drm/1.2/IDrmPlugin.hal
@@ -0,0 +1,94 @@
+/**
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.drm@1.2;
+
+import @1.1::IDrmPlugin;
+import @1.0::Status;
+
+/**
+ * IDrmPlugin is used to interact with a specific drm plugin that was created by
+ * IDrm::createPlugin. A drm plugin provides methods for obtaining drm keys that
+ * may be used by a codec to decrypt protected video content.
+ */
+interface IDrmPlugin extends @1.1::IDrmPlugin {
+
+    /**
+     * The keys in an offline license allow protected content to be
+     * played even if the device is not connected to a network.
+     * Offline licenses are stored on the device after a key
+     * request/response exchange when the key request KeyType is
+     * OFFLINE. Normally each app is responsible for keeping track of
+     * the KeySetIds it has created. In some situations however, it
+     * may be necessary to request the list of stored offline license
+     * KeySetIds. If an app loses the KeySetId for any stored licenses
+     * that it created, for example, it must be able to recover the
+     * stored KeySetIds so those licenses can be removed when they
+     * expire or when the app is uninstalled.
+     * <p>
+     * This method returns a list of the KeySetIds for all offline
+     * licenses. The offline license KeySetId may be used to query
+     * the status of an offline license or remove it.
+     *
+     * @return status the status of the call. May be OK or
+     *     ERROR_DRM_INVALID_STATE if the HAL is in a state where the
+     *     KeySetIds can't be returned.
+     * @return a list of offline license keySetIds. If there are no offline
+     *     licenses, the list must be empty and OK must be returned as the
+     *     status.
+     */
+    getOfflineLicenseKeySetIds() generates (Status status, vec<KeySetId> keySetIds);
+
+    /**
+     * Normally offline licenses are released using a key
+     * request/response exchange using getKeyRequest where the KeyType
+     * is RELEASE, followed by provideKeyResponse. This allows the
+     * server to cryptographically confirm that the license has been
+     * removed and then adjust the count of offline licenses allocated
+     * to the device.
+     * <p>
+     * In some exceptional situations it may be necessary to directly
+     * remove offline licenses without notifying the server, which may
+     * be performed using this method.
+     *
+     * @param keySetId the id of the offline license to remove
+     * @return status the status of the call. May be one of OK on
+     *     success, BAD_VALUE if the license is not found or
+     *     ERROR_DRM_INVALID_STATE if the HAL is in a state where the
+     *     KeySetIds can't be returned.
+     */
+    removeOfflineLicense(KeySetId keySetId) generates (Status status);
+
+    /**
+     * Request the state of an offline license. An offline license may
+     * be usable or inactive. The keys in a usable offline license are
+     * available for decryption. When the offline license state is
+     * inactive, the keys have been marked for release using
+     * getKeyRequest with KeyType RELEASE but the key response has not
+     * been received. The keys in an inactive offline license are not
+     * usable for decryption.
+     *
+     * @param keySetId the id of the offline license
+     * @return status the status of the call. May be one of OK on
+     *     success, BAD_VALUE if the license is not found or
+     *     ERROR_DRM_INVALID_STATE if the HAL is in a state where the
+     *     offline license state can't be queried.
+     * @return the offline license state, one of USABLE or INACTIVE.
+     *     If the return status is not OK then state must be set to
+     *     UNKNOWN.
+     */
+    getOfflineLicenseState(KeySetId keySetId) generates (Status status,
+            OfflineLicenseState state);
+};
diff --git a/drm/1.2/types.hal b/drm/1.2/types.hal
new file mode 100644
index 0000000..8770c79
--- /dev/null
+++ b/drm/1.2/types.hal
@@ -0,0 +1,45 @@
+/**
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.drm@1.2;
+
+enum OfflineLicenseState : uint32_t {
+    /**
+     * Offline license state is unknown
+     */
+    UNKNOWN,
+
+    /**
+     * Offline license state is usable, the keys may be used for decryption.
+     */
+    USABLE,
+
+    /**
+     * Offline license state is inactive, the keys have been marked for
+     * release using {@link #getKeyRequest} with KEY_TYPE_RELEASE but the
+     * key response has not been received.
+     */
+    INACTIVE
+};
+
+/**
+ * KeySetId is an identifier that references a set of keys in an
+ * offline license. The keySetId is created by the HAL implementation
+ * and returned from provideKeyResponse and getOfflineLicenseIds. The
+ * framework passes KeySetId back to the HAL when referring to the key
+ * set in methods that take a KeySetId as an input parameter.
+ */
+typedef vec<uint8_t> KeySetId;
diff --git a/keymaster/4.0/support/authorization_set.cpp b/keymaster/4.0/support/authorization_set.cpp
index 10d272a..b6cba61 100644
--- a/keymaster/4.0/support/authorization_set.cpp
+++ b/keymaster/4.0/support/authorization_set.cpp
@@ -261,9 +261,8 @@
 template <>
 struct choose_serializer<> {
     static OutStreams& serialize(OutStreams& out, const KeyParameter& param) {
-        LOG(FATAL) << "Trying to serialize unknown tag " << unsigned(param.tag)
+        LOG(ERROR) << "Trying to serialize unknown tag " << unsigned(param.tag)
                    << ". Did you forget to add it to all_tags_t?";
-        abort();
         return out;
     }
 };
diff --git a/neuralnetworks/1.0/vts/functional/Android.bp b/neuralnetworks/1.0/vts/functional/Android.bp
index 1b5e338..234527a 100644
--- a/neuralnetworks/1.0/vts/functional/Android.bp
+++ b/neuralnetworks/1.0/vts/functional/Android.bp
@@ -80,6 +80,5 @@
     srcs: [
         "BasicTests.cpp",
         "GeneratedTests.cpp",
-        "ValidationTests.cpp",
     ],
 }
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
index 1f66c43..802d018 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
+++ b/neuralnetworks/1.0/vts/functional/GeneratedTestHarness.cpp
@@ -45,6 +45,7 @@
 using ::test_helper::Int32Operands;
 using ::test_helper::MixedTyped;
 using ::test_helper::MixedTypedExample;
+using ::test_helper::MixedTypedIndex;
 using ::test_helper::Quant8Operands;
 using ::test_helper::resize_accordingly;
 
@@ -63,14 +64,16 @@
     copy_back_<int32_t>(dst, ra, src);
     copy_back_<uint8_t>(dst, ra, src);
     copy_back_<int16_t>(dst, ra, src);
-    static_assert(4 == std::tuple_size<MixedTyped>::value,
+    copy_back_<_Float16>(dst, ra, src);
+    static_assert(5 == std::tuple_size<MixedTyped>::value,
                   "Number of types in MixedTyped changed, but copy_back function wasn't updated");
 }
 
 // Top level driver for models and examples generated by test_generator.py
 // Test driver for those generated from ml/nn/runtime/test/spec
 void EvaluatePreparedModel(sp<IPreparedModel>& preparedModel, std::function<bool(int)> is_ignored,
-                           const std::vector<MixedTypedExample>& examples, float fpAtol = 1e-5f,
+                           const std::vector<MixedTypedExample>& examples,
+                           bool hasRelaxedFloat32Model = false, float fpAtol = 1e-5f,
                            float fpRtol = 1e-5f) {
     const uint32_t INPUT = 0;
     const uint32_t OUTPUT = 1;
@@ -78,13 +81,20 @@
     int example_no = 1;
     for (auto& example : examples) {
         SCOPED_TRACE(example_no++);
-
         const MixedTyped& inputs = example.operands.first;
         const MixedTyped& golden = example.operands.second;
 
+        const bool hasFloat16Inputs = !std::get<MixedTypedIndex<_Float16>::index>(inputs).empty();
+        if (hasRelaxedFloat32Model || hasFloat16Inputs) {
+            // TODO: Adjust the error limit based on testing.
+            // If in relaxed mode, set the absolute tolerance to be 5ULP of FP16.
+            fpAtol = 5.0f * 0.0009765625f;
+            // Set the relative tolerance to be 5ULP of the corresponding FP precision.
+            fpRtol = 5.0f * 0.0009765625f;
+        }
+
         std::vector<RequestArgument> inputs_info, outputs_info;
         uint32_t inputSize = 0, outputSize = 0;
-
         // This function only partially specifies the metadata (vector of RequestArguments).
         // The contents are copied over below.
         for_all(inputs, [&inputs_info, &inputSize](int index, auto, auto s) {
@@ -228,7 +238,8 @@
     ASSERT_NE(nullptr, preparedModel.get());
 
     float fpAtol = 1e-5f, fpRtol = 5.0f * 1.1920928955078125e-7f;
-    EvaluatePreparedModel(preparedModel, is_ignored, examples, fpAtol, fpRtol);
+    EvaluatePreparedModel(preparedModel, is_ignored, examples,
+                          /*hasRelaxedFloat32Model=*/false, fpAtol, fpRtol);
 }
 
 void Execute(const sp<V1_1::IDevice>& device, std::function<V1_1::Model(void)> create_model,
@@ -272,13 +283,8 @@
     EXPECT_EQ(ErrorStatus::NONE, prepareReturnStatus);
     ASSERT_NE(nullptr, preparedModel.get());
 
-    // TODO: Adjust the error limit based on testing.
-    // If in relaxed mode, set the absolute tolerance to be 5ULP of FP16.
-    float fpAtol = !model.relaxComputationFloat32toFloat16 ? 1e-5f : 5.0f * 0.0009765625f;
-    // Set the relative tolerance to be 5ULP of the corresponding FP precision.
-    float fpRtol = !model.relaxComputationFloat32toFloat16 ? 5.0f * 1.1920928955078125e-7f
-                                                           : 5.0f * 0.0009765625f;
-    EvaluatePreparedModel(preparedModel, is_ignored, examples, fpAtol, fpRtol);
+    EvaluatePreparedModel(preparedModel, is_ignored, examples,
+                          model.relaxComputationFloat32toFloat16);
 }
 
 // TODO: Reduce code duplication.
@@ -323,13 +329,8 @@
     EXPECT_EQ(ErrorStatus::NONE, prepareReturnStatus);
     ASSERT_NE(nullptr, preparedModel.get());
 
-    // TODO: Adjust the error limit based on testing.
-    // If in relaxed mode, set the absolute tolerance to be 5ULP of FP16.
-    float fpAtol = !model.relaxComputationFloat32toFloat16 ? 1e-5f : 5.0f * 0.0009765625f;
-    // Set the relative tolerance to be 5ULP of the corresponding FP precision.
-    float fpRtol = !model.relaxComputationFloat32toFloat16 ? 5.0f * 1.1920928955078125e-7f
-                                                           : 5.0f * 0.0009765625f;
-    EvaluatePreparedModel(preparedModel, is_ignored, examples, fpAtol, fpRtol);
+    EvaluatePreparedModel(preparedModel, is_ignored, examples,
+                          model.relaxComputationFloat32toFloat16);
 }
 
 }  // namespace generated_tests
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTests.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTests.cpp
index ac1ae60..26b4d8b 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTests.cpp
+++ b/neuralnetworks/1.0/vts/functional/GeneratedTests.cpp
@@ -45,6 +45,8 @@
 using ::android::nn::allocateSharedMemory;
 using ::test_helper::MixedTypedExample;
 
+std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
+
 // in frameworks/ml/nn/runtime/tests/generated/
 #include "all_generated_V1_0_vts_tests.cpp"
 
diff --git a/neuralnetworks/1.0/vts/functional/Models.h b/neuralnetworks/1.0/vts/functional/Models.h
deleted file mode 100644
index 268e671..0000000
--- a/neuralnetworks/1.0/vts/functional/Models.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VTS_HAL_NEURALNETWORKS_V1_0_VTS_FUNCTIONAL_MODELS_H
-#define VTS_HAL_NEURALNETWORKS_V1_0_VTS_FUNCTIONAL_MODELS_H
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "TestHarness.h"
-
-#include <android/hardware/neuralnetworks/1.0/types.h>
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_0 {
-namespace vts {
-namespace functional {
-
-using MixedTypedExample = test_helper::MixedTypedExample;
-
-#define FOR_EACH_TEST_MODEL(FN)                          \
-    FN(add_broadcast_quant8)                             \
-    FN(add)                                              \
-    FN(add_quant8)                                       \
-    FN(avg_pool_float_1)                                 \
-    FN(avg_pool_float_2)                                 \
-    FN(avg_pool_float_3)                                 \
-    FN(avg_pool_float_4)                                 \
-    FN(avg_pool_float_5)                                 \
-    FN(avg_pool_quant8_1)                                \
-    FN(avg_pool_quant8_2)                                \
-    FN(avg_pool_quant8_3)                                \
-    FN(avg_pool_quant8_4)                                \
-    FN(avg_pool_quant8_5)                                \
-    FN(concat_float_1)                                   \
-    FN(concat_float_2)                                   \
-    FN(concat_float_3)                                   \
-    FN(concat_quant8_1)                                  \
-    FN(concat_quant8_2)                                  \
-    FN(concat_quant8_3)                                  \
-    FN(conv_1_h3_w2_SAME)                                \
-    FN(conv_1_h3_w2_VALID)                               \
-    FN(conv_3_h3_w2_SAME)                                \
-    FN(conv_3_h3_w2_VALID)                               \
-    FN(conv_float_2)                                     \
-    FN(conv_float_channels)                              \
-    FN(conv_float_channels_weights_as_inputs)            \
-    FN(conv_float_large)                                 \
-    FN(conv_float_large_weights_as_inputs)               \
-    FN(conv_float)                                       \
-    FN(conv_float_weights_as_inputs)                     \
-    FN(conv_quant8_2)                                    \
-    FN(conv_quant8_channels)                             \
-    FN(conv_quant8_channels_weights_as_inputs)           \
-    FN(conv_quant8_large)                                \
-    FN(conv_quant8_large_weights_as_inputs)              \
-    FN(conv_quant8)                                      \
-    FN(conv_quant8_overflow)                             \
-    FN(conv_quant8_overflow_weights_as_inputs)           \
-    FN(conv_quant8_weights_as_inputs)                    \
-    FN(depth_to_space_float_1)                           \
-    FN(depth_to_space_float_2)                           \
-    FN(depth_to_space_float_3)                           \
-    FN(depth_to_space_quant8_1)                          \
-    FN(depth_to_space_quant8_2)                          \
-    FN(depthwise_conv2d_float_2)                         \
-    FN(depthwise_conv2d_float_large_2)                   \
-    FN(depthwise_conv2d_float_large_2_weights_as_inputs) \
-    FN(depthwise_conv2d_float_large)                     \
-    FN(depthwise_conv2d_float_large_weights_as_inputs)   \
-    FN(depthwise_conv2d_float)                           \
-    FN(depthwise_conv2d_float_weights_as_inputs)         \
-    FN(depthwise_conv2d_quant8_2)                        \
-    FN(depthwise_conv2d_quant8_large)                    \
-    FN(depthwise_conv2d_quant8_large_weights_as_inputs)  \
-    FN(depthwise_conv2d_quant8)                          \
-    FN(depthwise_conv2d_quant8_weights_as_inputs)        \
-    FN(depthwise_conv)                                   \
-    FN(dequantize)                                       \
-    FN(embedding_lookup)                                 \
-    FN(floor)                                            \
-    FN(fully_connected_float_2)                          \
-    FN(fully_connected_float_large)                      \
-    FN(fully_connected_float_large_weights_as_inputs)    \
-    FN(fully_connected_float)                            \
-    FN(fully_connected_float_weights_as_inputs)          \
-    FN(fully_connected_quant8_2)                         \
-    FN(fully_connected_quant8_large)                     \
-    FN(fully_connected_quant8_large_weights_as_inputs)   \
-    FN(fully_connected_quant8)                           \
-    FN(fully_connected_quant8_weights_as_inputs)         \
-    FN(hashtable_lookup_float)                           \
-    FN(hashtable_lookup_quant8)                          \
-    FN(l2_normalization_2)                               \
-    FN(l2_normalization_large)                           \
-    FN(l2_normalization)                                 \
-    FN(l2_pool_float_2)                                  \
-    FN(l2_pool_float_large)                              \
-    FN(l2_pool_float)                                    \
-    FN(local_response_norm_float_1)                      \
-    FN(local_response_norm_float_2)                      \
-    FN(local_response_norm_float_3)                      \
-    FN(local_response_norm_float_4)                      \
-    FN(logistic_float_1)                                 \
-    FN(logistic_float_2)                                 \
-    FN(logistic_quant8_1)                                \
-    FN(logistic_quant8_2)                                \
-    FN(lsh_projection_2)                                 \
-    FN(lsh_projection)                                   \
-    FN(lsh_projection_weights_as_inputs)                 \
-    FN(lstm2)                                            \
-    FN(lstm2_state2)                                     \
-    FN(lstm2_state)                                      \
-    FN(lstm3)                                            \
-    FN(lstm3_state2)                                     \
-    FN(lstm3_state3)                                     \
-    FN(lstm3_state)                                      \
-    FN(lstm)                                             \
-    FN(lstm_state2)                                      \
-    FN(lstm_state)                                       \
-    FN(max_pool_float_1)                                 \
-    FN(max_pool_float_2)                                 \
-    FN(max_pool_float_3)                                 \
-    FN(max_pool_float_4)                                 \
-    FN(max_pool_quant8_1)                                \
-    FN(max_pool_quant8_2)                                \
-    FN(max_pool_quant8_3)                                \
-    FN(max_pool_quant8_4)                                \
-    FN(mobilenet_224_gender_basic_fixed)                 \
-    FN(mobilenet_quantized)                              \
-    FN(mul_broadcast_quant8)                             \
-    FN(mul)                                              \
-    FN(mul_quant8)                                       \
-    FN(mul_relu)                                         \
-    FN(relu1_float_1)                                    \
-    FN(relu1_float_2)                                    \
-    FN(relu1_quant8_1)                                   \
-    FN(relu1_quant8_2)                                   \
-    FN(relu6_float_1)                                    \
-    FN(relu6_float_2)                                    \
-    FN(relu6_quant8_1)                                   \
-    FN(relu6_quant8_2)                                   \
-    FN(relu_float_1)                                     \
-    FN(relu_float_2)                                     \
-    FN(relu_quant8_1)                                    \
-    FN(relu_quant8_2)                                    \
-    FN(reshape)                                          \
-    FN(reshape_quant8)                                   \
-    FN(reshape_quant8_weights_as_inputs)                 \
-    FN(reshape_weights_as_inputs)                        \
-    FN(resize_bilinear_2)                                \
-    FN(resize_bilinear)                                  \
-    FN(rnn)                                              \
-    FN(rnn_state)                                        \
-    FN(softmax_float_1)                                  \
-    FN(softmax_float_2)                                  \
-    FN(softmax_quant8_1)                                 \
-    FN(softmax_quant8_2)                                 \
-    FN(space_to_depth_float_1)                           \
-    FN(space_to_depth_float_2)                           \
-    FN(space_to_depth_float_3)                           \
-    FN(space_to_depth_quant8_1)                          \
-    FN(space_to_depth_quant8_2)                          \
-    FN(svdf2)                                            \
-    FN(svdf)                                             \
-    FN(svdf_state)                                       \
-    FN(tanh)
-
-#define FORWARD_DECLARE_GENERATED_OBJECTS(function) \
-    namespace function {                            \
-    extern std::vector<MixedTypedExample> examples; \
-    Model createTestModel();                        \
-    }
-
-FOR_EACH_TEST_MODEL(FORWARD_DECLARE_GENERATED_OBJECTS)
-
-#undef FORWARD_DECLARE_GENERATED_OBJECTS
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_0
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
-
-#endif  // VTS_HAL_NEURALNETWORKS_V1_0_VTS_FUNCTIONAL_MODELS_H
diff --git a/neuralnetworks/1.0/vts/functional/ValidationTests.cpp b/neuralnetworks/1.0/vts/functional/ValidationTests.cpp
deleted file mode 100644
index d3cbcff..0000000
--- a/neuralnetworks/1.0/vts/functional/ValidationTests.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "Models.h"
-#include "VtsHalNeuralnetworks.h"
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_0 {
-namespace vts {
-namespace functional {
-
-// forward declarations
-std::vector<Request> createRequests(const std::vector<::test_helper::MixedTypedExample>& examples);
-
-// generate validation tests
-#define VTS_CURRENT_TEST_CASE(TestName)                                           \
-    TEST_F(ValidationTest, TestName) {                                            \
-        const Model model = TestName::createTestModel();                          \
-        const std::vector<Request> requests = createRequests(TestName::examples); \
-        validateModel(model);                                                     \
-        validateRequests(model, requests);                                        \
-    }
-
-FOR_EACH_TEST_MODEL(VTS_CURRENT_TEST_CASE)
-
-#undef VTS_CURRENT_TEST_CASE
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_0
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
diff --git a/neuralnetworks/1.1/vts/functional/Android.bp b/neuralnetworks/1.1/vts/functional/Android.bp
index df1ac67..07c9b6e 100644
--- a/neuralnetworks/1.1/vts/functional/Android.bp
+++ b/neuralnetworks/1.1/vts/functional/Android.bp
@@ -20,7 +20,6 @@
     defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
     srcs: [
         "GeneratedTestsV1_0.cpp",
-        "ValidationTestsV1_0.cpp",
     ],
 }
 
@@ -31,6 +30,5 @@
     srcs: [
         "BasicTests.cpp",
         "GeneratedTests.cpp",
-        "ValidationTests.cpp",
     ],
 }
diff --git a/neuralnetworks/1.1/vts/functional/GeneratedTests.cpp b/neuralnetworks/1.1/vts/functional/GeneratedTests.cpp
index d16f181..290a9d3 100644
--- a/neuralnetworks/1.1/vts/functional/GeneratedTests.cpp
+++ b/neuralnetworks/1.1/vts/functional/GeneratedTests.cpp
@@ -45,6 +45,8 @@
 using ::android::nn::allocateSharedMemory;
 using ::test_helper::MixedTypedExample;
 
+std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
+
 // in frameworks/ml/nn/runtime/tests/generated/
 #include "all_generated_V1_1_vts_tests.cpp"
 
diff --git a/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
index e2acd7d..a36b24c 100644
--- a/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
+++ b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
@@ -45,6 +45,8 @@
 using ::android::nn::allocateSharedMemory;
 using ::test_helper::MixedTypedExample;
 
+std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
+
 // in frameworks/ml/nn/runtime/tests/generated/
 #include "all_generated_V1_0_vts_tests.cpp"
 
diff --git a/neuralnetworks/1.1/vts/functional/Models.h b/neuralnetworks/1.1/vts/functional/Models.h
deleted file mode 100644
index 57da010..0000000
--- a/neuralnetworks/1.1/vts/functional/Models.h
+++ /dev/null
@@ -1,231 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VTS_HAL_NEURALNETWORKS_V1_1_VTS_FUNCTIONAL_MODELS_H
-#define VTS_HAL_NEURALNETWORKS_V1_1_VTS_FUNCTIONAL_MODELS_H
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "TestHarness.h"
-
-#include <android/hardware/neuralnetworks/1.0/types.h>
-#include <android/hardware/neuralnetworks/1.1/types.h>
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_1 {
-namespace vts {
-namespace functional {
-
-using MixedTypedExample = test_helper::MixedTypedExample;
-
-#define FOR_EACH_TEST_MODEL(FN)                                  \
-    FN(add_relaxed)                                              \
-    FN(avg_pool_float_1_relaxed)                                 \
-    FN(avg_pool_float_2_relaxed)                                 \
-    FN(avg_pool_float_3_relaxed)                                 \
-    FN(avg_pool_float_4_relaxed)                                 \
-    FN(avg_pool_float_5_relaxed)                                 \
-    FN(batch_to_space)                                           \
-    FN(batch_to_space_float_1)                                   \
-    FN(batch_to_space_float_1_relaxed)                           \
-    FN(batch_to_space_quant8_1)                                  \
-    FN(batch_to_space_relaxed)                                   \
-    FN(concat_float_1_relaxed)                                   \
-    FN(concat_float_2_relaxed)                                   \
-    FN(concat_float_3_relaxed)                                   \
-    FN(conv_1_h3_w2_SAME_relaxed)                                \
-    FN(conv_1_h3_w2_VALID_relaxed)                               \
-    FN(conv_3_h3_w2_SAME_relaxed)                                \
-    FN(conv_3_h3_w2_VALID_relaxed)                               \
-    FN(conv_float_2_relaxed)                                     \
-    FN(conv_float_channels_relaxed)                              \
-    FN(conv_float_channels_weights_as_inputs_relaxed)            \
-    FN(conv_float_large_relaxed)                                 \
-    FN(conv_float_large_weights_as_inputs_relaxed)               \
-    FN(conv_float_relaxed)                                       \
-    FN(conv_float_weights_as_inputs_relaxed)                     \
-    FN(depth_to_space_float_1_relaxed)                           \
-    FN(depth_to_space_float_2_relaxed)                           \
-    FN(depth_to_space_float_3_relaxed)                           \
-    FN(depthwise_conv2d_float_2_relaxed)                         \
-    FN(depthwise_conv2d_float_large_2_relaxed)                   \
-    FN(depthwise_conv2d_float_large_2_weights_as_inputs_relaxed) \
-    FN(depthwise_conv2d_float_large_relaxed)                     \
-    FN(depthwise_conv2d_float_large_weights_as_inputs_relaxed)   \
-    FN(depthwise_conv2d_float_relaxed)                           \
-    FN(depthwise_conv2d_float_weights_as_inputs_relaxed)         \
-    FN(depthwise_conv_relaxed)                                   \
-    FN(dequantize_relaxed)                                       \
-    FN(div)                                                      \
-    FN(div_broadcast_float)                                      \
-    FN(div_broadcast_float_relaxed)                              \
-    FN(div_relaxed)                                              \
-    FN(embedding_lookup_relaxed)                                 \
-    FN(floor_relaxed)                                            \
-    FN(fully_connected_float_2_relaxed)                          \
-    FN(fully_connected_float_4d_simple)                          \
-    FN(fully_connected_float_4d_simple_relaxed)                  \
-    FN(fully_connected_float_large_relaxed)                      \
-    FN(fully_connected_float_large_weights_as_inputs_relaxed)    \
-    FN(fully_connected_float_relaxed)                            \
-    FN(fully_connected_float_weights_as_inputs_relaxed)          \
-    FN(hashtable_lookup_float_relaxed)                           \
-    FN(l2_normalization_2_relaxed)                               \
-    FN(l2_normalization_large_relaxed)                           \
-    FN(l2_normalization_relaxed)                                 \
-    FN(l2_pool_float_2_relaxed)                                  \
-    FN(l2_pool_float_large_relaxed)                              \
-    FN(l2_pool_float_relaxed)                                    \
-    FN(local_response_norm_float_1_relaxed)                      \
-    FN(local_response_norm_float_2_relaxed)                      \
-    FN(local_response_norm_float_3_relaxed)                      \
-    FN(local_response_norm_float_4_relaxed)                      \
-    FN(logistic_float_1_relaxed)                                 \
-    FN(logistic_float_2_relaxed)                                 \
-    FN(lsh_projection_2_relaxed)                                 \
-    FN(lsh_projection_relaxed)                                   \
-    FN(lsh_projection_weights_as_inputs_relaxed)                 \
-    FN(lstm2_relaxed)                                            \
-    FN(lstm2_state2_relaxed)                                     \
-    FN(lstm2_state_relaxed)                                      \
-    FN(lstm3_relaxed)                                            \
-    FN(lstm3_state2_relaxed)                                     \
-    FN(lstm3_state3_relaxed)                                     \
-    FN(lstm3_state_relaxed)                                      \
-    FN(lstm_relaxed)                                             \
-    FN(lstm_state2_relaxed)                                      \
-    FN(lstm_state_relaxed)                                       \
-    FN(max_pool_float_1_relaxed)                                 \
-    FN(max_pool_float_2_relaxed)                                 \
-    FN(max_pool_float_3_relaxed)                                 \
-    FN(max_pool_float_4_relaxed)                                 \
-    FN(mean)                                                     \
-    FN(mean_float_1)                                             \
-    FN(mean_float_1_relaxed)                                     \
-    FN(mean_float_2)                                             \
-    FN(mean_float_2_relaxed)                                     \
-    FN(mean_quant8_1)                                            \
-    FN(mean_quant8_2)                                            \
-    FN(mean_relaxed)                                             \
-    FN(mobilenet_224_gender_basic_fixed_relaxed)                 \
-    FN(mul_relaxed)                                              \
-    FN(mul_relu_relaxed)                                         \
-    FN(pad)                                                      \
-    FN(pad_float_1)                                              \
-    FN(pad_float_1_relaxed)                                      \
-    FN(pad_relaxed)                                              \
-    FN(relu1_float_1_relaxed)                                    \
-    FN(relu1_float_2_relaxed)                                    \
-    FN(relu6_float_1_relaxed)                                    \
-    FN(relu6_float_2_relaxed)                                    \
-    FN(relu_float_1_relaxed)                                     \
-    FN(relu_float_2_relaxed)                                     \
-    FN(reshape_relaxed)                                          \
-    FN(reshape_weights_as_inputs_relaxed)                        \
-    FN(resize_bilinear_2_relaxed)                                \
-    FN(resize_bilinear_relaxed)                                  \
-    FN(rnn_relaxed)                                              \
-    FN(rnn_state_relaxed)                                        \
-    FN(softmax_float_1_relaxed)                                  \
-    FN(softmax_float_2_relaxed)                                  \
-    FN(space_to_batch)                                           \
-    FN(space_to_batch_float_1)                                   \
-    FN(space_to_batch_float_1_relaxed)                           \
-    FN(space_to_batch_float_2)                                   \
-    FN(space_to_batch_float_2_relaxed)                           \
-    FN(space_to_batch_float_3)                                   \
-    FN(space_to_batch_float_3_relaxed)                           \
-    FN(space_to_batch_quant8_1)                                  \
-    FN(space_to_batch_quant8_2)                                  \
-    FN(space_to_batch_quant8_3)                                  \
-    FN(space_to_batch_relaxed)                                   \
-    FN(space_to_depth_float_1_relaxed)                           \
-    FN(space_to_depth_float_2_relaxed)                           \
-    FN(space_to_depth_float_3_relaxed)                           \
-    FN(squeeze)                                                  \
-    FN(squeeze_float_1)                                          \
-    FN(squeeze_float_1_relaxed)                                  \
-    FN(squeeze_quant8_1)                                         \
-    FN(squeeze_relaxed)                                          \
-    FN(strided_slice)                                            \
-    FN(strided_slice_float_1)                                    \
-    FN(strided_slice_float_10)                                   \
-    FN(strided_slice_float_10_relaxed)                           \
-    FN(strided_slice_float_11)                                   \
-    FN(strided_slice_float_11_relaxed)                           \
-    FN(strided_slice_float_1_relaxed)                            \
-    FN(strided_slice_float_2)                                    \
-    FN(strided_slice_float_2_relaxed)                            \
-    FN(strided_slice_float_3)                                    \
-    FN(strided_slice_float_3_relaxed)                            \
-    FN(strided_slice_float_4)                                    \
-    FN(strided_slice_float_4_relaxed)                            \
-    FN(strided_slice_float_5)                                    \
-    FN(strided_slice_float_5_relaxed)                            \
-    FN(strided_slice_float_6)                                    \
-    FN(strided_slice_float_6_relaxed)                            \
-    FN(strided_slice_float_7)                                    \
-    FN(strided_slice_float_7_relaxed)                            \
-    FN(strided_slice_float_8)                                    \
-    FN(strided_slice_float_8_relaxed)                            \
-    FN(strided_slice_float_9)                                    \
-    FN(strided_slice_float_9_relaxed)                            \
-    FN(strided_slice_qaunt8_10)                                  \
-    FN(strided_slice_qaunt8_11)                                  \
-    FN(strided_slice_quant8_1)                                   \
-    FN(strided_slice_quant8_2)                                   \
-    FN(strided_slice_quant8_3)                                   \
-    FN(strided_slice_quant8_4)                                   \
-    FN(strided_slice_quant8_5)                                   \
-    FN(strided_slice_quant8_6)                                   \
-    FN(strided_slice_quant8_7)                                   \
-    FN(strided_slice_quant8_8)                                   \
-    FN(strided_slice_quant8_9)                                   \
-    FN(strided_slice_relaxed)                                    \
-    FN(sub)                                                      \
-    FN(sub_broadcast_float)                                      \
-    FN(sub_broadcast_float_relaxed)                              \
-    FN(sub_relaxed)                                              \
-    FN(svdf2_relaxed)                                            \
-    FN(svdf_relaxed)                                             \
-    FN(svdf_state_relaxed)                                       \
-    FN(tanh_relaxed)                                             \
-    FN(transpose)                                                \
-    FN(transpose_float_1)                                        \
-    FN(transpose_float_1_relaxed)                                \
-    FN(transpose_quant8_1)                                       \
-    FN(transpose_relaxed)
-
-#define FORWARD_DECLARE_GENERATED_OBJECTS(function) \
-    namespace function {                            \
-    extern std::vector<MixedTypedExample> examples; \
-    Model createTestModel();                        \
-    }
-
-FOR_EACH_TEST_MODEL(FORWARD_DECLARE_GENERATED_OBJECTS)
-
-#undef FORWARD_DECLARE_GENERATED_OBJECTS
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_1
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
-
-#endif  // VTS_HAL_NEURALNETWORKS_V1_1_VTS_FUNCTIONAL_MODELS_H
diff --git a/neuralnetworks/1.1/vts/functional/ModelsV1_0.h b/neuralnetworks/1.1/vts/functional/ModelsV1_0.h
deleted file mode 100644
index 52c0346..0000000
--- a/neuralnetworks/1.1/vts/functional/ModelsV1_0.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VTS_HAL_NEURALNETWORKS_V1_1_VTS_FUNCTIONAL_MODELS_V1_0_H
-#define VTS_HAL_NEURALNETWORKS_V1_1_VTS_FUNCTIONAL_MODELS_V1_0_H
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "TestHarness.h"
-
-#include <android/hardware/neuralnetworks/1.0/types.h>
-#include <android/hardware/neuralnetworks/1.1/types.h>
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_1 {
-namespace vts {
-namespace functional {
-
-using MixedTypedExample = test_helper::MixedTypedExample;
-
-#define FOR_EACH_TEST_MODEL(FN)                          \
-    FN(add_broadcast_quant8)                             \
-    FN(add)                                              \
-    FN(add_quant8)                                       \
-    FN(avg_pool_float_1)                                 \
-    FN(avg_pool_float_2)                                 \
-    FN(avg_pool_float_3)                                 \
-    FN(avg_pool_float_4)                                 \
-    FN(avg_pool_float_5)                                 \
-    FN(avg_pool_quant8_1)                                \
-    FN(avg_pool_quant8_2)                                \
-    FN(avg_pool_quant8_3)                                \
-    FN(avg_pool_quant8_4)                                \
-    FN(avg_pool_quant8_5)                                \
-    FN(concat_float_1)                                   \
-    FN(concat_float_2)                                   \
-    FN(concat_float_3)                                   \
-    FN(concat_quant8_1)                                  \
-    FN(concat_quant8_2)                                  \
-    FN(concat_quant8_3)                                  \
-    FN(conv_1_h3_w2_SAME)                                \
-    FN(conv_1_h3_w2_VALID)                               \
-    FN(conv_3_h3_w2_SAME)                                \
-    FN(conv_3_h3_w2_VALID)                               \
-    FN(conv_float_2)                                     \
-    FN(conv_float_channels)                              \
-    FN(conv_float_channels_weights_as_inputs)            \
-    FN(conv_float_large)                                 \
-    FN(conv_float_large_weights_as_inputs)               \
-    FN(conv_float)                                       \
-    FN(conv_float_weights_as_inputs)                     \
-    FN(conv_quant8_2)                                    \
-    FN(conv_quant8_channels)                             \
-    FN(conv_quant8_channels_weights_as_inputs)           \
-    FN(conv_quant8_large)                                \
-    FN(conv_quant8_large_weights_as_inputs)              \
-    FN(conv_quant8)                                      \
-    FN(conv_quant8_overflow)                             \
-    FN(conv_quant8_overflow_weights_as_inputs)           \
-    FN(conv_quant8_weights_as_inputs)                    \
-    FN(depth_to_space_float_1)                           \
-    FN(depth_to_space_float_2)                           \
-    FN(depth_to_space_float_3)                           \
-    FN(depth_to_space_quant8_1)                          \
-    FN(depth_to_space_quant8_2)                          \
-    FN(depthwise_conv2d_float_2)                         \
-    FN(depthwise_conv2d_float_large_2)                   \
-    FN(depthwise_conv2d_float_large_2_weights_as_inputs) \
-    FN(depthwise_conv2d_float_large)                     \
-    FN(depthwise_conv2d_float_large_weights_as_inputs)   \
-    FN(depthwise_conv2d_float)                           \
-    FN(depthwise_conv2d_float_weights_as_inputs)         \
-    FN(depthwise_conv2d_quant8_2)                        \
-    FN(depthwise_conv2d_quant8_large)                    \
-    FN(depthwise_conv2d_quant8_large_weights_as_inputs)  \
-    FN(depthwise_conv2d_quant8)                          \
-    FN(depthwise_conv2d_quant8_weights_as_inputs)        \
-    FN(depthwise_conv)                                   \
-    FN(dequantize)                                       \
-    FN(embedding_lookup)                                 \
-    FN(floor)                                            \
-    FN(fully_connected_float_2)                          \
-    FN(fully_connected_float_large)                      \
-    FN(fully_connected_float_large_weights_as_inputs)    \
-    FN(fully_connected_float)                            \
-    FN(fully_connected_float_weights_as_inputs)          \
-    FN(fully_connected_quant8_2)                         \
-    FN(fully_connected_quant8_large)                     \
-    FN(fully_connected_quant8_large_weights_as_inputs)   \
-    FN(fully_connected_quant8)                           \
-    FN(fully_connected_quant8_weights_as_inputs)         \
-    FN(hashtable_lookup_float)                           \
-    FN(hashtable_lookup_quant8)                          \
-    FN(l2_normalization_2)                               \
-    FN(l2_normalization_large)                           \
-    FN(l2_normalization)                                 \
-    FN(l2_pool_float_2)                                  \
-    FN(l2_pool_float_large)                              \
-    FN(l2_pool_float)                                    \
-    FN(local_response_norm_float_1)                      \
-    FN(local_response_norm_float_2)                      \
-    FN(local_response_norm_float_3)                      \
-    FN(local_response_norm_float_4)                      \
-    FN(logistic_float_1)                                 \
-    FN(logistic_float_2)                                 \
-    FN(logistic_quant8_1)                                \
-    FN(logistic_quant8_2)                                \
-    FN(lsh_projection_2)                                 \
-    FN(lsh_projection)                                   \
-    FN(lsh_projection_weights_as_inputs)                 \
-    FN(lstm2)                                            \
-    FN(lstm2_state2)                                     \
-    FN(lstm2_state)                                      \
-    FN(lstm3)                                            \
-    FN(lstm3_state2)                                     \
-    FN(lstm3_state3)                                     \
-    FN(lstm3_state)                                      \
-    FN(lstm)                                             \
-    FN(lstm_state2)                                      \
-    FN(lstm_state)                                       \
-    FN(max_pool_float_1)                                 \
-    FN(max_pool_float_2)                                 \
-    FN(max_pool_float_3)                                 \
-    FN(max_pool_float_4)                                 \
-    FN(max_pool_quant8_1)                                \
-    FN(max_pool_quant8_2)                                \
-    FN(max_pool_quant8_3)                                \
-    FN(max_pool_quant8_4)                                \
-    FN(mobilenet_224_gender_basic_fixed)                 \
-    FN(mobilenet_quantized)                              \
-    FN(mul_broadcast_quant8)                             \
-    FN(mul)                                              \
-    FN(mul_quant8)                                       \
-    FN(mul_relu)                                         \
-    FN(relu1_float_1)                                    \
-    FN(relu1_float_2)                                    \
-    FN(relu1_quant8_1)                                   \
-    FN(relu1_quant8_2)                                   \
-    FN(relu6_float_1)                                    \
-    FN(relu6_float_2)                                    \
-    FN(relu6_quant8_1)                                   \
-    FN(relu6_quant8_2)                                   \
-    FN(relu_float_1)                                     \
-    FN(relu_float_2)                                     \
-    FN(relu_quant8_1)                                    \
-    FN(relu_quant8_2)                                    \
-    FN(reshape)                                          \
-    FN(reshape_quant8)                                   \
-    FN(reshape_quant8_weights_as_inputs)                 \
-    FN(reshape_weights_as_inputs)                        \
-    FN(resize_bilinear_2)                                \
-    FN(resize_bilinear)                                  \
-    FN(rnn)                                              \
-    FN(rnn_state)                                        \
-    FN(softmax_float_1)                                  \
-    FN(softmax_float_2)                                  \
-    FN(softmax_quant8_1)                                 \
-    FN(softmax_quant8_2)                                 \
-    FN(space_to_depth_float_1)                           \
-    FN(space_to_depth_float_2)                           \
-    FN(space_to_depth_float_3)                           \
-    FN(space_to_depth_quant8_1)                          \
-    FN(space_to_depth_quant8_2)                          \
-    FN(svdf2)                                            \
-    FN(svdf)                                             \
-    FN(svdf_state)                                       \
-    FN(tanh)
-
-#define FORWARD_DECLARE_GENERATED_OBJECTS(function) \
-    namespace function {                            \
-    extern std::vector<MixedTypedExample> examples; \
-    Model createTestModel();                        \
-    }
-
-FOR_EACH_TEST_MODEL(FORWARD_DECLARE_GENERATED_OBJECTS)
-
-#undef FORWARD_DECLARE_GENERATED_OBJECTS
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_1
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
-
-#endif  // VTS_HAL_NEURALNETWORKS_V1_1_VTS_FUNCTIONAL_MODELS_V1_0_H
diff --git a/neuralnetworks/1.1/vts/functional/ValidationTests.cpp b/neuralnetworks/1.1/vts/functional/ValidationTests.cpp
deleted file mode 100644
index 1c35ba8..0000000
--- a/neuralnetworks/1.1/vts/functional/ValidationTests.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "Models.h"
-#include "VtsHalNeuralnetworks.h"
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_1 {
-namespace vts {
-namespace functional {
-
-// forward declarations
-std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
-
-// generate validation tests
-#define VTS_CURRENT_TEST_CASE(TestName)                                           \
-    TEST_F(ValidationTest, TestName) {                                            \
-        const Model model = TestName::createTestModel();                          \
-        const std::vector<Request> requests = createRequests(TestName::examples); \
-        validateModel(model);                                                     \
-        validateRequests(model, requests);                                        \
-    }
-
-FOR_EACH_TEST_MODEL(VTS_CURRENT_TEST_CASE)
-
-#undef VTS_CURRENT_TEST_CASE
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_1
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
diff --git a/neuralnetworks/1.1/vts/functional/ValidationTestsV1_0.cpp b/neuralnetworks/1.1/vts/functional/ValidationTestsV1_0.cpp
deleted file mode 100644
index 7e2af05..0000000
--- a/neuralnetworks/1.1/vts/functional/ValidationTestsV1_0.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "ModelsV1_0.h"
-#include "VtsHalNeuralnetworks.h"
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_1 {
-namespace vts {
-namespace functional {
-
-// forward declarations
-std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
-
-// generate validation tests
-#define VTS_CURRENT_TEST_CASE(TestName)                                           \
-    TEST_F(ValidationTest, TestName) {                                            \
-        const Model model = TestName::createTestModel();                          \
-        const std::vector<Request> requests = createRequests(TestName::examples); \
-        validateModel(model);                                                     \
-        validateRequests(model, requests);                                        \
-    }
-
-FOR_EACH_TEST_MODEL(VTS_CURRENT_TEST_CASE)
-
-#undef VTS_CURRENT_TEST_CASE
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_1
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index 4a1e7a8..22d0002 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -47,6 +47,18 @@
 };
 
 /**
+ * The range of values in the OperandType enum.
+ *
+ * THE MAX VALUES MUST BE UPDATED WHEN ADDING NEW TYPES to the OperandType enum.
+ */
+enum OperandTypeRange : uint32_t {
+    OPERAND_FUNDAMENTAL_MIN = 0,
+    OPERAND_FUNDAMENTAL_MAX = 8,
+    OPERAND_OEM_MIN     = 10000,
+    OPERAND_OEM_MAX     = 10001,
+};
+
+/**
  * Operation types.
  *
  * The type of an operation in a model.
@@ -106,6 +118,18 @@
 };
 
 /**
+ * The range of values in the OperationType enum.
+ *
+ * THE MAX VALUES MUST BE UPDATED WHEN ADDING NEW TYPES to the OperationType enum.
+ */
+enum OperationTypeRange : uint32_t {
+    OPERATION_FUNDAMENTAL_MIN = 0,
+    OPERATION_FUNDAMENTAL_MAX = 87,
+    OPERATION_OEM_MIN = 10000,
+    OPERATION_OEM_MAX = 10000,
+};
+
+/**
  * Describes one operation of the model's graph.
  */
 struct Operation {
diff --git a/neuralnetworks/1.2/vts/functional/Android.bp b/neuralnetworks/1.2/vts/functional/Android.bp
index 087c12f..085d5db 100644
--- a/neuralnetworks/1.2/vts/functional/Android.bp
+++ b/neuralnetworks/1.2/vts/functional/Android.bp
@@ -20,7 +20,6 @@
     defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
     srcs: [
         "GeneratedTestsV1_0.cpp",
-        "ValidationTestsV1_0.cpp",
     ]
 }
 
@@ -30,7 +29,6 @@
     defaults: ["VtsHalNeuralNetworksTargetTestDefaults"],
     srcs: [
         "GeneratedTestsV1_1.cpp",
-        "ValidationTestsV1_1.cpp",
     ],
 }
 
@@ -41,6 +39,5 @@
     srcs: [
         "BasicTests.cpp",
         "GeneratedTests.cpp",
-        "ValidationTests.cpp",
     ],
 }
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTests.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTests.cpp
index 0608139..79d5a60 100644
--- a/neuralnetworks/1.2/vts/functional/GeneratedTests.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTests.cpp
@@ -45,6 +45,8 @@
 using ::android::nn::allocateSharedMemory;
 using ::test_helper::MixedTypedExample;
 
+std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
+
 // in frameworks/ml/nn/runtime/tests/generated/
 #include "all_generated_V1_2_vts_tests.cpp"
 
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
index 8d685d1..42e22b0 100644
--- a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
@@ -45,6 +45,8 @@
 using ::android::nn::allocateSharedMemory;
 using ::test_helper::MixedTypedExample;
 
+std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
+
 // in frameworks/ml/nn/runtime/tests/generated/
 #include "all_generated_V1_0_vts_tests.cpp"
 
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
index 8dbb586..aab5cb6 100644
--- a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
@@ -45,6 +45,8 @@
 using ::android::nn::allocateSharedMemory;
 using ::test_helper::MixedTypedExample;
 
+std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
+
 // in frameworks/ml/nn/runtime/tests/generated/
 #include "all_generated_V1_1_vts_tests.cpp"
 
diff --git a/neuralnetworks/1.2/vts/functional/Models.h b/neuralnetworks/1.2/vts/functional/Models.h
deleted file mode 100644
index 2426ad0..0000000
--- a/neuralnetworks/1.2/vts/functional/Models.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VTS_HAL_NEURALNETWORKS_V1_2_VTS_FUNCTIONAL_MODELS_H
-#define VTS_HAL_NEURALNETWORKS_V1_2_VTS_FUNCTIONAL_MODELS_H
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "TestHarness.h"
-
-#include <android/hardware/neuralnetworks/1.0/types.h>
-#include <android/hardware/neuralnetworks/1.1/types.h>
-#include <android/hardware/neuralnetworks/1.2/types.h>
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace vts {
-namespace functional {
-
-using MixedTypedExample = test_helper::MixedTypedExample;
-
-#define FOR_EACH_TEST_MODEL(FN) FN(random_multinomial)
-
-#define FORWARD_DECLARE_GENERATED_OBJECTS(function) \
-    namespace function {                            \
-    extern std::vector<MixedTypedExample> examples; \
-    Model createTestModel();                        \
-    }
-
-FOR_EACH_TEST_MODEL(FORWARD_DECLARE_GENERATED_OBJECTS)
-
-#undef FORWARD_DECLARE_GENERATED_OBJECTS
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_2
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
-
-#endif  // VTS_HAL_NEURALNETWORKS_V1_2_VTS_FUNCTIONAL_MODELS_H
diff --git a/neuralnetworks/1.2/vts/functional/ModelsV1_0.h b/neuralnetworks/1.2/vts/functional/ModelsV1_0.h
deleted file mode 100644
index e81e64b..0000000
--- a/neuralnetworks/1.2/vts/functional/ModelsV1_0.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VTS_HAL_NEURALNETWORKS_V1_2_VTS_FUNCTIONAL_MODELS_V1_0_H
-#define VTS_HAL_NEURALNETWORKS_V1_2_VTS_FUNCTIONAL_MODELS_V1_0_H
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "TestHarness.h"
-
-#include <android/hardware/neuralnetworks/1.0/types.h>
-#include <android/hardware/neuralnetworks/1.1/types.h>
-#include <android/hardware/neuralnetworks/1.2/types.h>
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace vts {
-namespace functional {
-
-using MixedTypedExample = test_helper::MixedTypedExample;
-
-#define FOR_EACH_TEST_MODEL(FN)                          \
-    FN(add_broadcast_quant8)                             \
-    FN(add)                                              \
-    FN(add_quant8)                                       \
-    FN(avg_pool_float_1)                                 \
-    FN(avg_pool_float_2)                                 \
-    FN(avg_pool_float_3)                                 \
-    FN(avg_pool_float_4)                                 \
-    FN(avg_pool_float_5)                                 \
-    FN(avg_pool_quant8_1)                                \
-    FN(avg_pool_quant8_2)                                \
-    FN(avg_pool_quant8_3)                                \
-    FN(avg_pool_quant8_4)                                \
-    FN(avg_pool_quant8_5)                                \
-    FN(concat_float_1)                                   \
-    FN(concat_float_2)                                   \
-    FN(concat_float_3)                                   \
-    FN(concat_quant8_1)                                  \
-    FN(concat_quant8_2)                                  \
-    FN(concat_quant8_3)                                  \
-    FN(conv_1_h3_w2_SAME)                                \
-    FN(conv_1_h3_w2_VALID)                               \
-    FN(conv_3_h3_w2_SAME)                                \
-    FN(conv_3_h3_w2_VALID)                               \
-    FN(conv_float_2)                                     \
-    FN(conv_float_channels)                              \
-    FN(conv_float_channels_weights_as_inputs)            \
-    FN(conv_float_large)                                 \
-    FN(conv_float_large_weights_as_inputs)               \
-    FN(conv_float)                                       \
-    FN(conv_float_weights_as_inputs)                     \
-    FN(conv_quant8_2)                                    \
-    FN(conv_quant8_channels)                             \
-    FN(conv_quant8_channels_weights_as_inputs)           \
-    FN(conv_quant8_large)                                \
-    FN(conv_quant8_large_weights_as_inputs)              \
-    FN(conv_quant8)                                      \
-    FN(conv_quant8_overflow)                             \
-    FN(conv_quant8_overflow_weights_as_inputs)           \
-    FN(conv_quant8_weights_as_inputs)                    \
-    FN(depth_to_space_float_1)                           \
-    FN(depth_to_space_float_2)                           \
-    FN(depth_to_space_float_3)                           \
-    FN(depth_to_space_quant8_1)                          \
-    FN(depth_to_space_quant8_2)                          \
-    FN(depthwise_conv2d_float_2)                         \
-    FN(depthwise_conv2d_float_large_2)                   \
-    FN(depthwise_conv2d_float_large_2_weights_as_inputs) \
-    FN(depthwise_conv2d_float_large)                     \
-    FN(depthwise_conv2d_float_large_weights_as_inputs)   \
-    FN(depthwise_conv2d_float)                           \
-    FN(depthwise_conv2d_float_weights_as_inputs)         \
-    FN(depthwise_conv2d_quant8_2)                        \
-    FN(depthwise_conv2d_quant8_large)                    \
-    FN(depthwise_conv2d_quant8_large_weights_as_inputs)  \
-    FN(depthwise_conv2d_quant8)                          \
-    FN(depthwise_conv2d_quant8_weights_as_inputs)        \
-    FN(depthwise_conv)                                   \
-    FN(dequantize)                                       \
-    FN(embedding_lookup)                                 \
-    FN(floor)                                            \
-    FN(fully_connected_float_2)                          \
-    FN(fully_connected_float_large)                      \
-    FN(fully_connected_float_large_weights_as_inputs)    \
-    FN(fully_connected_float)                            \
-    FN(fully_connected_float_weights_as_inputs)          \
-    FN(fully_connected_quant8_2)                         \
-    FN(fully_connected_quant8_large)                     \
-    FN(fully_connected_quant8_large_weights_as_inputs)   \
-    FN(fully_connected_quant8)                           \
-    FN(fully_connected_quant8_weights_as_inputs)         \
-    FN(hashtable_lookup_float)                           \
-    FN(hashtable_lookup_quant8)                          \
-    FN(l2_normalization_2)                               \
-    FN(l2_normalization_large)                           \
-    FN(l2_normalization)                                 \
-    FN(l2_pool_float_2)                                  \
-    FN(l2_pool_float_large)                              \
-    FN(l2_pool_float)                                    \
-    FN(local_response_norm_float_1)                      \
-    FN(local_response_norm_float_2)                      \
-    FN(local_response_norm_float_3)                      \
-    FN(local_response_norm_float_4)                      \
-    FN(logistic_float_1)                                 \
-    FN(logistic_float_2)                                 \
-    FN(logistic_quant8_1)                                \
-    FN(logistic_quant8_2)                                \
-    FN(lsh_projection_2)                                 \
-    FN(lsh_projection)                                   \
-    FN(lsh_projection_weights_as_inputs)                 \
-    FN(lstm2)                                            \
-    FN(lstm2_state2)                                     \
-    FN(lstm2_state)                                      \
-    FN(lstm3)                                            \
-    FN(lstm3_state2)                                     \
-    FN(lstm3_state3)                                     \
-    FN(lstm3_state)                                      \
-    FN(lstm)                                             \
-    FN(lstm_state2)                                      \
-    FN(lstm_state)                                       \
-    FN(max_pool_float_1)                                 \
-    FN(max_pool_float_2)                                 \
-    FN(max_pool_float_3)                                 \
-    FN(max_pool_float_4)                                 \
-    FN(max_pool_quant8_1)                                \
-    FN(max_pool_quant8_2)                                \
-    FN(max_pool_quant8_3)                                \
-    FN(max_pool_quant8_4)                                \
-    FN(mobilenet_224_gender_basic_fixed)                 \
-    FN(mobilenet_quantized)                              \
-    FN(mul_broadcast_quant8)                             \
-    FN(mul)                                              \
-    FN(mul_quant8)                                       \
-    FN(mul_relu)                                         \
-    FN(relu1_float_1)                                    \
-    FN(relu1_float_2)                                    \
-    FN(relu1_quant8_1)                                   \
-    FN(relu1_quant8_2)                                   \
-    FN(relu6_float_1)                                    \
-    FN(relu6_float_2)                                    \
-    FN(relu6_quant8_1)                                   \
-    FN(relu6_quant8_2)                                   \
-    FN(relu_float_1)                                     \
-    FN(relu_float_2)                                     \
-    FN(relu_quant8_1)                                    \
-    FN(relu_quant8_2)                                    \
-    FN(reshape)                                          \
-    FN(reshape_quant8)                                   \
-    FN(reshape_quant8_weights_as_inputs)                 \
-    FN(reshape_weights_as_inputs)                        \
-    FN(resize_bilinear_2)                                \
-    FN(resize_bilinear)                                  \
-    FN(rnn)                                              \
-    FN(rnn_state)                                        \
-    FN(softmax_float_1)                                  \
-    FN(softmax_float_2)                                  \
-    FN(softmax_quant8_1)                                 \
-    FN(softmax_quant8_2)                                 \
-    FN(space_to_depth_float_1)                           \
-    FN(space_to_depth_float_2)                           \
-    FN(space_to_depth_float_3)                           \
-    FN(space_to_depth_quant8_1)                          \
-    FN(space_to_depth_quant8_2)                          \
-    FN(svdf2)                                            \
-    FN(svdf)                                             \
-    FN(svdf_state)                                       \
-    FN(tanh)
-
-#define FORWARD_DECLARE_GENERATED_OBJECTS(function) \
-    namespace function {                            \
-    extern std::vector<MixedTypedExample> examples; \
-    Model createTestModel();                        \
-    }
-
-FOR_EACH_TEST_MODEL(FORWARD_DECLARE_GENERATED_OBJECTS)
-
-#undef FORWARD_DECLARE_GENERATED_OBJECTS
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_2
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
-
-#endif  // VTS_HAL_NEURALNETWORKS_V1_2_VTS_FUNCTIONAL_MODELS_V1_0_H
diff --git a/neuralnetworks/1.2/vts/functional/ModelsV1_1.h b/neuralnetworks/1.2/vts/functional/ModelsV1_1.h
deleted file mode 100644
index eb68de4..0000000
--- a/neuralnetworks/1.2/vts/functional/ModelsV1_1.h
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef VTS_HAL_NEURALNETWORKS_V1_1_VTS_FUNCTIONAL_MODELS_H
-#define VTS_HAL_NEURALNETWORKS_V1_1_VTS_FUNCTIONAL_MODELS_H
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "TestHarness.h"
-
-#include <android/hardware/neuralnetworks/1.2/types.h>
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace vts {
-namespace functional {
-
-using MixedTypedExample = test_helper::MixedTypedExample;
-
-#define FOR_EACH_TEST_MODEL(FN)                                  \
-    FN(add_relaxed)                                              \
-    FN(avg_pool_float_1_relaxed)                                 \
-    FN(avg_pool_float_2_relaxed)                                 \
-    FN(avg_pool_float_3_relaxed)                                 \
-    FN(avg_pool_float_4_relaxed)                                 \
-    FN(avg_pool_float_5_relaxed)                                 \
-    FN(batch_to_space)                                           \
-    FN(batch_to_space_float_1)                                   \
-    FN(batch_to_space_float_1_relaxed)                           \
-    FN(batch_to_space_quant8_1)                                  \
-    FN(batch_to_space_relaxed)                                   \
-    FN(concat_float_1_relaxed)                                   \
-    FN(concat_float_2_relaxed)                                   \
-    FN(concat_float_3_relaxed)                                   \
-    FN(conv_1_h3_w2_SAME_relaxed)                                \
-    FN(conv_1_h3_w2_VALID_relaxed)                               \
-    FN(conv_3_h3_w2_SAME_relaxed)                                \
-    FN(conv_3_h3_w2_VALID_relaxed)                               \
-    FN(conv_float_2_relaxed)                                     \
-    FN(conv_float_channels_relaxed)                              \
-    FN(conv_float_channels_weights_as_inputs_relaxed)            \
-    FN(conv_float_large_relaxed)                                 \
-    FN(conv_float_large_weights_as_inputs_relaxed)               \
-    FN(conv_float_relaxed)                                       \
-    FN(conv_float_weights_as_inputs_relaxed)                     \
-    FN(depth_to_space_float_1_relaxed)                           \
-    FN(depth_to_space_float_2_relaxed)                           \
-    FN(depth_to_space_float_3_relaxed)                           \
-    FN(depthwise_conv2d_float_2_relaxed)                         \
-    FN(depthwise_conv2d_float_large_2_relaxed)                   \
-    FN(depthwise_conv2d_float_large_2_weights_as_inputs_relaxed) \
-    FN(depthwise_conv2d_float_large_relaxed)                     \
-    FN(depthwise_conv2d_float_large_weights_as_inputs_relaxed)   \
-    FN(depthwise_conv2d_float_relaxed)                           \
-    FN(depthwise_conv2d_float_weights_as_inputs_relaxed)         \
-    FN(depthwise_conv_relaxed)                                   \
-    FN(dequantize_relaxed)                                       \
-    FN(div)                                                      \
-    FN(div_broadcast_float)                                      \
-    FN(div_broadcast_float_relaxed)                              \
-    FN(div_relaxed)                                              \
-    FN(embedding_lookup_relaxed)                                 \
-    FN(floor_relaxed)                                            \
-    FN(fully_connected_float_2_relaxed)                          \
-    FN(fully_connected_float_4d_simple)                          \
-    FN(fully_connected_float_4d_simple_relaxed)                  \
-    FN(fully_connected_float_large_relaxed)                      \
-    FN(fully_connected_float_large_weights_as_inputs_relaxed)    \
-    FN(fully_connected_float_relaxed)                            \
-    FN(fully_connected_float_weights_as_inputs_relaxed)          \
-    FN(hashtable_lookup_float_relaxed)                           \
-    FN(l2_normalization_2_relaxed)                               \
-    FN(l2_normalization_large_relaxed)                           \
-    FN(l2_normalization_relaxed)                                 \
-    FN(l2_pool_float_2_relaxed)                                  \
-    FN(l2_pool_float_large_relaxed)                              \
-    FN(l2_pool_float_relaxed)                                    \
-    FN(local_response_norm_float_1_relaxed)                      \
-    FN(local_response_norm_float_2_relaxed)                      \
-    FN(local_response_norm_float_3_relaxed)                      \
-    FN(local_response_norm_float_4_relaxed)                      \
-    FN(logistic_float_1_relaxed)                                 \
-    FN(logistic_float_2_relaxed)                                 \
-    FN(lsh_projection_2_relaxed)                                 \
-    FN(lsh_projection_relaxed)                                   \
-    FN(lsh_projection_weights_as_inputs_relaxed)                 \
-    FN(lstm2_relaxed)                                            \
-    FN(lstm2_state2_relaxed)                                     \
-    FN(lstm2_state_relaxed)                                      \
-    FN(lstm3_relaxed)                                            \
-    FN(lstm3_state2_relaxed)                                     \
-    FN(lstm3_state3_relaxed)                                     \
-    FN(lstm3_state_relaxed)                                      \
-    FN(lstm_relaxed)                                             \
-    FN(lstm_state2_relaxed)                                      \
-    FN(lstm_state_relaxed)                                       \
-    FN(max_pool_float_1_relaxed)                                 \
-    FN(max_pool_float_2_relaxed)                                 \
-    FN(max_pool_float_3_relaxed)                                 \
-    FN(max_pool_float_4_relaxed)                                 \
-    FN(mean)                                                     \
-    FN(mean_float_1)                                             \
-    FN(mean_float_1_relaxed)                                     \
-    FN(mean_float_2)                                             \
-    FN(mean_float_2_relaxed)                                     \
-    FN(mean_quant8_1)                                            \
-    FN(mean_quant8_2)                                            \
-    FN(mean_relaxed)                                             \
-    FN(mobilenet_224_gender_basic_fixed_relaxed)                 \
-    FN(mul_relaxed)                                              \
-    FN(mul_relu_relaxed)                                         \
-    FN(pad)                                                      \
-    FN(pad_float_1)                                              \
-    FN(pad_float_1_relaxed)                                      \
-    FN(pad_relaxed)                                              \
-    FN(relu1_float_1_relaxed)                                    \
-    FN(relu1_float_2_relaxed)                                    \
-    FN(relu6_float_1_relaxed)                                    \
-    FN(relu6_float_2_relaxed)                                    \
-    FN(relu_float_1_relaxed)                                     \
-    FN(relu_float_2_relaxed)                                     \
-    FN(reshape_relaxed)                                          \
-    FN(reshape_weights_as_inputs_relaxed)                        \
-    FN(resize_bilinear_2_relaxed)                                \
-    FN(resize_bilinear_relaxed)                                  \
-    FN(rnn_relaxed)                                              \
-    FN(rnn_state_relaxed)                                        \
-    FN(softmax_float_1_relaxed)                                  \
-    FN(softmax_float_2_relaxed)                                  \
-    FN(space_to_batch)                                           \
-    FN(space_to_batch_float_1)                                   \
-    FN(space_to_batch_float_1_relaxed)                           \
-    FN(space_to_batch_float_2)                                   \
-    FN(space_to_batch_float_2_relaxed)                           \
-    FN(space_to_batch_float_3)                                   \
-    FN(space_to_batch_float_3_relaxed)                           \
-    FN(space_to_batch_quant8_1)                                  \
-    FN(space_to_batch_quant8_2)                                  \
-    FN(space_to_batch_quant8_3)                                  \
-    FN(space_to_batch_relaxed)                                   \
-    FN(space_to_depth_float_1_relaxed)                           \
-    FN(space_to_depth_float_2_relaxed)                           \
-    FN(space_to_depth_float_3_relaxed)                           \
-    FN(squeeze)                                                  \
-    FN(squeeze_float_1)                                          \
-    FN(squeeze_float_1_relaxed)                                  \
-    FN(squeeze_quant8_1)                                         \
-    FN(squeeze_relaxed)                                          \
-    FN(strided_slice)                                            \
-    FN(strided_slice_float_1)                                    \
-    FN(strided_slice_float_10)                                   \
-    FN(strided_slice_float_10_relaxed)                           \
-    FN(strided_slice_float_11)                                   \
-    FN(strided_slice_float_11_relaxed)                           \
-    FN(strided_slice_float_1_relaxed)                            \
-    FN(strided_slice_float_2)                                    \
-    FN(strided_slice_float_2_relaxed)                            \
-    FN(strided_slice_float_3)                                    \
-    FN(strided_slice_float_3_relaxed)                            \
-    FN(strided_slice_float_4)                                    \
-    FN(strided_slice_float_4_relaxed)                            \
-    FN(strided_slice_float_5)                                    \
-    FN(strided_slice_float_5_relaxed)                            \
-    FN(strided_slice_float_6)                                    \
-    FN(strided_slice_float_6_relaxed)                            \
-    FN(strided_slice_float_7)                                    \
-    FN(strided_slice_float_7_relaxed)                            \
-    FN(strided_slice_float_8)                                    \
-    FN(strided_slice_float_8_relaxed)                            \
-    FN(strided_slice_float_9)                                    \
-    FN(strided_slice_float_9_relaxed)                            \
-    FN(strided_slice_qaunt8_10)                                  \
-    FN(strided_slice_qaunt8_11)                                  \
-    FN(strided_slice_quant8_1)                                   \
-    FN(strided_slice_quant8_2)                                   \
-    FN(strided_slice_quant8_3)                                   \
-    FN(strided_slice_quant8_4)                                   \
-    FN(strided_slice_quant8_5)                                   \
-    FN(strided_slice_quant8_6)                                   \
-    FN(strided_slice_quant8_7)                                   \
-    FN(strided_slice_quant8_8)                                   \
-    FN(strided_slice_quant8_9)                                   \
-    FN(strided_slice_relaxed)                                    \
-    FN(sub)                                                      \
-    FN(sub_broadcast_float)                                      \
-    FN(sub_broadcast_float_relaxed)                              \
-    FN(sub_relaxed)                                              \
-    FN(svdf2_relaxed)                                            \
-    FN(svdf_relaxed)                                             \
-    FN(svdf_state_relaxed)                                       \
-    FN(tanh_relaxed)                                             \
-    FN(transpose)                                                \
-    FN(transpose_float_1)                                        \
-    FN(transpose_float_1_relaxed)                                \
-    FN(transpose_quant8_1)                                       \
-    FN(transpose_relaxed)
-
-#define FORWARD_DECLARE_GENERATED_OBJECTS(function) \
-    namespace function {                            \
-    extern std::vector<MixedTypedExample> examples; \
-    Model createTestModel();                        \
-    }
-
-FOR_EACH_TEST_MODEL(FORWARD_DECLARE_GENERATED_OBJECTS)
-
-#undef FORWARD_DECLARE_GENERATED_OBJECTS
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_2
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
-
-#endif  // VTS_HAL_NEURALNETWORKS_V1_2_VTS_FUNCTIONAL_MODELS_V1_1_H
diff --git a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
index c1c6e55..b4921e3 100644
--- a/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
+++ b/neuralnetworks/1.2/vts/functional/ValidateModel.cpp
@@ -128,16 +128,16 @@
 
 ///////////////////////// VALIDATE MODEL OPERAND TYPE /////////////////////////
 
-static const int32_t invalidOperandTypes[] = {
-    static_cast<int32_t>(OperandType::FLOAT32) - 1,               // lower bound fundamental
-    static_cast<int32_t>(OperandType::TENSOR_QUANT16_ASYMM) + 1,  // upper bound fundamental
-    static_cast<int32_t>(OperandType::OEM) - 1,                   // lower bound OEM
-    static_cast<int32_t>(OperandType::TENSOR_OEM_BYTE) + 1,       // upper bound OEM
+static const uint32_t invalidOperandTypes[] = {
+    static_cast<uint32_t>(OperandTypeRange::OPERAND_FUNDAMENTAL_MIN) - 1,
+    static_cast<uint32_t>(OperandTypeRange::OPERAND_FUNDAMENTAL_MAX) + 1,
+    static_cast<uint32_t>(OperandTypeRange::OPERAND_OEM_MIN) - 1,
+    static_cast<uint32_t>(OperandTypeRange::OPERAND_OEM_MAX) + 1,
 };
 
 static void mutateOperandTypeTest(const sp<IDevice>& device, const Model& model) {
     for (size_t operand = 0; operand < model.operands.size(); ++operand) {
-        for (int32_t invalidOperandType : invalidOperandTypes) {
+        for (uint32_t invalidOperandType : invalidOperandTypes) {
             const std::string message = "mutateOperandTypeTest: operand " +
                                         std::to_string(operand) + " set to value " +
                                         std::to_string(invalidOperandType);
@@ -329,16 +329,16 @@
 
 ///////////////////////// VALIDATE MODEL OPERATION TYPE /////////////////////////
 
-static const int32_t invalidOperationTypes[] = {
-    static_cast<int32_t>(OperationType::ADD) - 1,            // lower bound fundamental
-    static_cast<int32_t>(OperationType::TRANSPOSE) + 1,      // upper bound fundamental
-    static_cast<int32_t>(OperationType::OEM_OPERATION) - 1,  // lower bound OEM
-    static_cast<int32_t>(OperationType::OEM_OPERATION) + 1,  // upper bound OEM
+static const uint32_t invalidOperationTypes[] = {
+    static_cast<uint32_t>(OperationTypeRange::OPERATION_FUNDAMENTAL_MIN) - 1,
+    static_cast<uint32_t>(OperationTypeRange::OPERATION_FUNDAMENTAL_MAX) + 1,
+    static_cast<uint32_t>(OperationTypeRange::OPERATION_OEM_MIN) - 1,
+    static_cast<uint32_t>(OperationTypeRange::OPERATION_OEM_MAX) + 1,
 };
 
 static void mutateOperationTypeTest(const sp<IDevice>& device, const Model& model) {
     for (size_t operation = 0; operation < model.operations.size(); ++operation) {
-        for (int32_t invalidOperationType : invalidOperationTypes) {
+        for (uint32_t invalidOperationType : invalidOperationTypes) {
             const std::string message = "mutateOperationTypeTest: operation " +
                                         std::to_string(operation) + " set to value " +
                                         std::to_string(invalidOperationType);
diff --git a/neuralnetworks/1.2/vts/functional/ValidationTests.cpp b/neuralnetworks/1.2/vts/functional/ValidationTests.cpp
deleted file mode 100644
index 3bdc5cd..0000000
--- a/neuralnetworks/1.2/vts/functional/ValidationTests.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "Models.h"
-#include "VtsHalNeuralnetworks.h"
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace vts {
-namespace functional {
-
-// forward declarations
-std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
-
-// generate validation tests
-#define VTS_CURRENT_TEST_CASE(TestName)                                           \
-    TEST_F(ValidationTest, TestName) {                                            \
-        const Model model = TestName::createTestModel();                          \
-        const std::vector<Request> requests = createRequests(TestName::examples); \
-        validateModel(model);                                                     \
-        validateRequests(model, requests);                                        \
-    }
-
-FOR_EACH_TEST_MODEL(VTS_CURRENT_TEST_CASE)
-
-#undef VTS_CURRENT_TEST_CASE
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_2
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
diff --git a/neuralnetworks/1.2/vts/functional/ValidationTestsV1_0.cpp b/neuralnetworks/1.2/vts/functional/ValidationTestsV1_0.cpp
deleted file mode 100644
index c54ed43..0000000
--- a/neuralnetworks/1.2/vts/functional/ValidationTestsV1_0.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "ModelsV1_0.h"
-#include "VtsHalNeuralnetworks.h"
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace vts {
-namespace functional {
-
-// forward declarations
-std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
-
-// generate validation tests
-#define VTS_CURRENT_TEST_CASE(TestName)                                           \
-    TEST_F(ValidationTest, TestName) {                                            \
-        const Model model = TestName::createTestModel();                          \
-        const std::vector<Request> requests = createRequests(TestName::examples); \
-        validateModel(model);                                                     \
-        validateRequests(model, requests);                                        \
-    }
-
-FOR_EACH_TEST_MODEL(VTS_CURRENT_TEST_CASE)
-
-#undef VTS_CURRENT_TEST_CASE
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_2
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
diff --git a/neuralnetworks/1.2/vts/functional/ValidationTestsV1_1.cpp b/neuralnetworks/1.2/vts/functional/ValidationTestsV1_1.cpp
deleted file mode 100644
index 95932d5..0000000
--- a/neuralnetworks/1.2/vts/functional/ValidationTestsV1_1.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "neuralnetworks_hidl_hal_test"
-
-#include "ModelsV1_1.h"
-#include "VtsHalNeuralnetworks.h"
-
-namespace android {
-namespace hardware {
-namespace neuralnetworks {
-namespace V1_2 {
-namespace vts {
-namespace functional {
-
-// forward declarations
-std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
-
-// generate validation tests
-#define VTS_CURRENT_TEST_CASE(TestName)                                           \
-    TEST_F(ValidationTest, TestName) {                                            \
-        const Model model = TestName::createTestModel();                          \
-        const std::vector<Request> requests = createRequests(TestName::examples); \
-        validateModel(model);                                                     \
-        validateRequests(model, requests);                                        \
-    }
-
-FOR_EACH_TEST_MODEL(VTS_CURRENT_TEST_CASE)
-
-#undef VTS_CURRENT_TEST_CASE
-
-}  // namespace functional
-}  // namespace vts
-}  // namespace V1_2
-}  // namespace neuralnetworks
-}  // namespace hardware
-}  // namespace android
diff --git a/soundtrigger/2.2/ISoundTriggerHw.hal b/soundtrigger/2.2/ISoundTriggerHw.hal
index fcb5087..a26896a 100644
--- a/soundtrigger/2.2/ISoundTriggerHw.hal
+++ b/soundtrigger/2.2/ISoundTriggerHw.hal
@@ -16,25 +16,27 @@
 
 package android.hardware.soundtrigger@2.2;
 
-import @2.0::ISoundTriggerHwCallback.RecognitionEvent;
 import @2.0::SoundModelHandle;
 import @2.1::ISoundTriggerHw;
 
 /**
- * SoundTrigger HAL interface. Used for hardware recognition of hotwords.
+ * SoundTrigger HAL interface. Used for hardware recognition of hotwords
+ * and other sounds.
  */
 interface ISoundTriggerHw extends @2.1::ISoundTriggerHw {
 
     /**
      * Get the state of a given model.
-     * The model state is returned as a RecognitionEvent.
-     * @param modelHandle The handle of the sound model to use for recognition
+     * The model state is returned asynchronously as a RecognitionEvent via
+     * the callback that was registered in StartRecognition().
+     * @param modelHandle The handle of the sound model whose state is being
+     *                    queried.
      * @return retval Operation completion status: 0 in case of success,
      *                -ENOSYS in case of invalid model handle,
      *                -ENOMEM in case of memory allocation failure,
-     *                -ENODEV in case of initialization error.
-     * @return state  RecognitionEvent in case of success
+     *                -ENODEV in case of initialization error,
+     *                -EINVAL in case where a recognition event is already
+     *                        being processed.
      */
-    getModelState(SoundModelHandle modelHandle)
-            generates (int32_t retval, @2.0::ISoundTriggerHwCallback.RecognitionEvent state);
+    getModelState(SoundModelHandle modelHandle) generates (int32_t retval);
 };
diff --git a/soundtrigger/2.2/default/SoundTriggerHw.cpp b/soundtrigger/2.2/default/SoundTriggerHw.cpp
index ffdf9fb..9d930ac 100644
--- a/soundtrigger/2.2/default/SoundTriggerHw.cpp
+++ b/soundtrigger/2.2/default/SoundTriggerHw.cpp
@@ -690,45 +690,26 @@
 
 // Begin V2_2 implementation
 
-Return<void> SoundTriggerHw::getModelState(int32_t modelHandle, getModelState_cb hidl_cb) {
-    int ret = 0;
-    V2_0::ISoundTriggerHwCallback::RecognitionEvent event;
-    struct sound_trigger_recognition_event* halEvent = NULL;
+Return<int32_t> SoundTriggerHw::getModelState(int32_t modelHandle) {
     sp<SoundModelClient> client;
     if (mHwDevice == NULL) {
-        ret = -ENODEV;
-        goto exit;
+        return -ENODEV;
     }
 
     {
         AutoMutex lock(mLock);
         client = mClients.valueFor(modelHandle);
         if (client == 0) {
-            ret = -ENOSYS;
-            goto exit;
+            return -ENOSYS;
         }
     }
 
     if (mHwDevice->get_model_state == NULL) {
         ALOGE("Failed to get model state from device, no such method");
-        ret = -ENODEV;
-        goto exit;
+        return -ENODEV;
     }
 
-    // Get the state from the device (as a recognition event)
-    halEvent = mHwDevice->get_model_state(mHwDevice, client->getHalHandle());
-    if (halEvent == NULL) {
-        ALOGE("Failed to get model state from device");
-        ret = -ENODEV;
-        goto exit;
-    }
-
-    convertRecognitionEventFromHal(&event, halEvent);
-
-exit:
-    hidl_cb(ret, event);
-    free(halEvent);
-    return Void();
+    return mHwDevice->get_model_state(mHwDevice, client->getHalHandle());
 }
 
 // Methods from ::android::hidl::base::V1_0::IBase follow.
diff --git a/soundtrigger/2.2/default/SoundTriggerHw.h b/soundtrigger/2.2/default/SoundTriggerHw.h
index 876b990..6676318 100644
--- a/soundtrigger/2.2/default/SoundTriggerHw.h
+++ b/soundtrigger/2.2/default/SoundTriggerHw.h
@@ -82,7 +82,7 @@
                                          int32_t cookie) override;
 
     // Methods from V2_2::ISoundTriggerHw follow.
-    Return<void> getModelState(int32_t modelHandle, getModelState_cb _hidl_cb) override;
+    Return<int32_t> getModelState(int32_t modelHandle) override;
 
     SoundTriggerHw();
 
diff --git a/soundtrigger/2.2/vts/functional/VtsHalSoundtriggerV2_2TargetTest.cpp b/soundtrigger/2.2/vts/functional/VtsHalSoundtriggerV2_2TargetTest.cpp
index a473c37..0f37816 100644
--- a/soundtrigger/2.2/vts/functional/VtsHalSoundtriggerV2_2TargetTest.cpp
+++ b/soundtrigger/2.2/vts/functional/VtsHalSoundtriggerV2_2TargetTest.cpp
@@ -74,21 +74,14 @@
  * Test ISoundTriggerHw::getModelState() method
  *
  * Verifies that:
- *  - the implementation returns -EINVAL with invalid model handle
+ *  - the implementation returns -ENOSYS with invalid model handle
  *
  */
 TEST_F(SoundTriggerHidlTest, GetModelStateInvalidModel) {
-    int ret = android::OK;
-    ::android::hardware::soundtrigger::V2_0::ISoundTriggerHwCallback::RecognitionEvent event;
     SoundModelHandle handle = 0;
-    Return<void> hidlReturn =
-        mSoundTriggerHal->getModelState(handle, [&](int32_t retval, auto res) {
-            ret = retval;
-            event = res;
-        });
-
+    Return<int32_t> hidlReturn = mSoundTriggerHal->getModelState(handle);
     EXPECT_TRUE(hidlReturn.isOk());
-    EXPECT_EQ(-ENOSYS, ret);
+    EXPECT_EQ(-ENOSYS, hidlReturn);
 }
 
 int main(int argc, char** argv) {