From e9cb2933a43f436e4e152f61a28cb0aee1e4bdda Mon Sep 17 00:00:00 2001 From: Arthur Ishiguro Date: Tue, 12 Apr 2022 15:43:51 +0000 Subject: 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 --- sensors/aidl/default/multihal/HalProxyAidl.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'sensors/aidl/default/multihal/HalProxyAidl.cpp') 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( sharedMemInfo.memoryHandle.getNativeHandle())); - if (!status.isOk()) { - *_aidl_return = -1; - } - return status; } -- cgit v1.2.3