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 bb1d8bfc93)
This commit is contained in:
Arthur Ishiguro
2022-07-06 15:29:13 +00:00
parent bfcf2eda1e
commit d90c46cc07

View File

@@ -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