summaryrefslogtreecommitdiff
path: root/sensors/aidl/default/multihal/HalProxyAidl.cpp
diff options
context:
space:
mode:
authorArthur Ishiguro <arthuri@google.com>2022-04-12 15:43:51 +0000
committerArthur Ishiguro <arthuri@google.com>2022-04-12 22:30:02 +0000
commite9cb2933a43f436e4e152f61a28cb0aee1e4bdda (patch)
tree69d80a6e1d2f78cabb5dd575b17240a5208646bb /sensors/aidl/default/multihal/HalProxyAidl.cpp
parent66d00d9bf5345fe5b8a8859245ea1f6770c71195 (diff)
Fix AIDL sensors VTS test
- According to the AIDL backends, return values are not propagated when the status is !ok(). Update the VTS test, HAL implementation, and ISensors definition to remove the requirement that the handle is populated to -1 on failure for registerDirectChannel. - Also update VTS tests for some error code checks to reflect the actual expecataions according to the ISensors documentation. Bug: 228645167 Test: VTS passes Change-Id: I5d4d4d0af3b033b34a58d8462aa40214d89fa442
Diffstat (limited to 'sensors/aidl/default/multihal/HalProxyAidl.cpp')
-rw-r--r--sensors/aidl/default/multihal/HalProxyAidl.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/sensors/aidl/default/multihal/HalProxyAidl.cpp b/sensors/aidl/default/multihal/HalProxyAidl.cpp
index 628914c3e3..e6bcdada52 100644
--- a/sensors/aidl/default/multihal/HalProxyAidl.cpp
+++ b/sensors/aidl/default/multihal/HalProxyAidl.cpp
@@ -141,10 +141,6 @@ ScopedAStatus HalProxyAidl::configDirectReport(int32_t in_sensorHandle,
*_aidl_return = reportToken;
});
- if (!status.isOk()) {
- *_aidl_return = -1;
- }
-
return status;
}
@@ -216,10 +212,6 @@ HalProxyAidl::registerDirectChannel(const ISensors::SharedMemInfo &in_mem,
native_handle_delete(const_cast<native_handle_t *>(
sharedMemInfo.memoryHandle.getNativeHandle()));
- if (!status.isOk()) {
- *_aidl_return = -1;
- }
-
return status;
}