Add setTestMode to Context Hub AIDL definition
Bug: 258074235
Test: make android.hardware.contexthub-update-api
Test: atest VtsAidlHalContextHubTargetTest
Test: m
Change-Id: I276857a2a2254cdf41bc8767ab972436a9015418
diff --git a/contexthub/aidl/default/ContextHub.cpp b/contexthub/aidl/default/ContextHub.cpp
index 615ac5c..b98bfb2 100644
--- a/contexthub/aidl/default/ContextHub.cpp
+++ b/contexthub/aidl/default/ContextHub.cpp
@@ -113,6 +113,10 @@
}
}
+ScopedAStatus ContextHub::setTestMode(bool /* enable */) {
+ return ndk::ScopedAStatus::ok();
+}
+
ScopedAStatus ContextHub::onHostEndpointConnected(const HostEndpointInfo& in_info) {
mConnectedHostEndpoints.insert(in_info.hostEndpointId);
diff --git a/contexthub/aidl/default/include/contexthub-impl/ContextHub.h b/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
index b3998b9..dc9aef0 100644
--- a/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
+++ b/contexthub/aidl/default/include/contexthub-impl/ContextHub.h
@@ -44,6 +44,7 @@
int32_t in_contextHubId, const std::shared_ptr<IContextHubCallback>& in_cb) override;
::ndk::ScopedAStatus sendMessageToHub(int32_t in_contextHubId,
const ContextHubMessage& in_message) override;
+ ::ndk::ScopedAStatus setTestMode(bool enable) override;
::ndk::ScopedAStatus onHostEndpointConnected(const HostEndpointInfo& in_info) override;
::ndk::ScopedAStatus onHostEndpointDisconnected(char16_t in_hostEndpointId) override;