Forward HalProxy::debug options.
Bug: 267262034
Test: adb shell dumpsys android.hardware.sensors.ISensors/default \
disp_info_histogram_cfg
Change-Id: Ic9eb19fb4483a7f5dae2d5dccb8e72cd4d7d8710
diff --git a/sensors/aidl/default/multihal/HalProxyAidl.cpp b/sensors/aidl/default/multihal/HalProxyAidl.cpp
index e6bcdad..dbef030 100644
--- a/sensors/aidl/default/multihal/HalProxyAidl.cpp
+++ b/sensors/aidl/default/multihal/HalProxyAidl.cpp
@@ -17,6 +17,7 @@
#include "HalProxyAidl.h"
#include <aidlcommonsupport/NativeHandle.h>
#include <fmq/AidlMessageQueue.h>
+#include <hidl/HidlSupport.h>
#include <hidl/Status.h>
#include "ConvertUtils.h"
#include "EventMessageQueueWrapperAidl.h"
@@ -28,6 +29,8 @@
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 @@
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_string> 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 @@
} // namespace sensors
} // namespace hardware
} // namespace android
-} // namespace aidl
\ No newline at end of file
+} // namespace aidl