Add VTS tests for new methods in contexthub HAL 1.2
Bug: 166846988
Test: Run against production HAL
Change-Id: I9e22f41736d54501cd74c7d56f61db8e771529df
diff --git a/contexthub/1.1/vts/functional/VtsHalContexthubV1_1TargetTest.cpp b/contexthub/1.1/vts/functional/VtsHalContexthubV1_1TargetTest.cpp
index 5f1dad9..acf4be0 100644
--- a/contexthub/1.1/vts/functional/VtsHalContexthubV1_1TargetTest.cpp
+++ b/contexthub/1.1/vts/functional/VtsHalContexthubV1_1TargetTest.cpp
@@ -31,6 +31,7 @@
#include <cinttypes>
+using ::android::hardware::contexthub::V1_0::IContexthubCallback;
using ::android::hardware::contexthub::V1_1::IContexthub;
using ::android::hardware::contexthub::V1_1::Setting;
using ::android::hardware::contexthub::V1_1::SettingValue;
@@ -45,10 +46,12 @@
class ContexthubHidlTest : public ContexthubHidlTestBase<IContexthub> {};
+class ContexthubCallbackV1_0 : public ContexthubCallbackBase<IContexthubCallback> {};
+
TEST_P(ContexthubHidlTest, TestOnSettingChanged) {
// In VTS, we only test that sending the values doesn't cause things to blow up - other test
// suites verify the expected E2E behavior in CHRE
- ASSERT_OK(registerCallback(new ContexthubCallbackBase()));
+ ASSERT_OK(registerCallback(new ContexthubCallbackV1_0()));
hubApi->onSettingChanged(Setting::LOCATION, SettingValue::DISABLED);
hubApi->onSettingChanged(Setting::LOCATION, SettingValue::ENABLED);
ASSERT_OK(registerCallback(nullptr));