summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Ishiguro <arthuri@google.com>2022-07-06 15:29:13 +0000
committerArthur Ishiguro <arthuri@google.com>2022-08-08 14:20:28 +0000
commitd90c46cc07e118a525e49d461b5ede5ac3b3a592 (patch)
tree49689126e000e6cbf3f493b69fc52c0083aaccc3
parentbfcf2eda1e26ec93c52f18bea459e2979a412ce2 (diff)
Modify onHostEndpointDisconnected to always return OK
Update the default HAL to reflect the API definition, which says that the HAL should silently ignore incorrect values. Bug: 233853737 Bug: 241339296 Test: Compile only Change-Id: Iae541e29706dddc6c9acb0563a2b484b75b549b5 (cherry picked from commit bb1d8bfc93cab1973d017012d06556321662d710)
-rw-r--r--contexthub/aidl/default/ContextHub.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/contexthub/aidl/default/ContextHub.cpp b/contexthub/aidl/default/ContextHub.cpp
index 4c23cbc8bf..35e4650ef2 100644
--- a/contexthub/aidl/default/ContextHub.cpp
+++ b/contexthub/aidl/default/ContextHub.cpp
@@ -107,10 +107,9 @@ ScopedAStatus ContextHub::onHostEndpointConnected(const HostEndpointInfo& in_inf
ScopedAStatus ContextHub::onHostEndpointDisconnected(char16_t in_hostEndpointId) {
if (mConnectedHostEndpoints.count(in_hostEndpointId) > 0) {
mConnectedHostEndpoints.erase(in_hostEndpointId);
- return ndk::ScopedAStatus::ok();
- } else {
- return ndk::ScopedAStatus(AStatus_fromExceptionCode(EX_ILLEGAL_ARGUMENT));
}
+
+ return ndk::ScopedAStatus::ok();
}
} // namespace contexthub