diff --git a/sensors/aidl/default/multihal/HalProxyAidl.cpp b/sensors/aidl/default/multihal/HalProxyAidl.cpp index e6bcdada52..dbef0305f9 100644 --- a/sensors/aidl/default/multihal/HalProxyAidl.cpp +++ b/sensors/aidl/default/multihal/HalProxyAidl.cpp @@ -17,6 +17,7 @@ #include "HalProxyAidl.h" #include #include +#include #include #include "ConvertUtils.h" #include "EventMessageQueueWrapperAidl.h" @@ -28,6 +29,8 @@ using ::aidl::android::hardware::common::fmq::MQDescriptor; using ::aidl::android::hardware::common::fmq::SynchronizedReadWrite; using ::aidl::android::hardware::sensors::ISensors; using ::aidl::android::hardware::sensors::ISensorsCallback; +using ::android::hardware::hidl_string; +using ::android::hardware::hidl_vec; using ::android::hardware::sensors::V2_1::implementation::convertToOldEvent; using ::ndk::ScopedAStatus; @@ -225,13 +228,18 @@ ScopedAStatus HalProxyAidl::unregisterDirectChannel(int32_t in_channelHandle) { return resultToAStatus(HalProxy::unregisterDirectChannel(in_channelHandle)); } -binder_status_t HalProxyAidl::dump(int fd, const char ** /* args */, - uint32_t /* numArgs */) { +binder_status_t HalProxyAidl::dump(int fd, const char ** args, + uint32_t numArgs) { native_handle_t *nativeHandle = native_handle_create(1 /* numFds */, 0 /* numInts */); nativeHandle->data[0] = fd; - HalProxy::debug(nativeHandle, {} /* args */); + hidl_vec hidl_args; + hidl_args.resize(numArgs); + for (size_t i = 0; i < numArgs; ++i) { + hidl_args[i] = args[i]; + } + HalProxy::debug(nativeHandle, hidl_args); native_handle_delete(nativeHandle); return STATUS_OK; @@ -241,4 +249,4 @@ binder_status_t HalProxyAidl::dump(int fd, const char ** /* args */, } // namespace sensors } // namespace hardware } // namespace android -} // namespace aidl \ No newline at end of file +} // namespace aidl