diff options
author | Arthur Ishiguro <arthuri@google.com> | 2022-04-11 15:35:05 +0000 |
---|---|---|
committer | Arthur Ishiguro <arthuri@google.com> | 2022-04-11 15:57:03 +0000 |
commit | 5fc076011ca247da94426196f125aa1ee4040fa0 (patch) | |
tree | 81ac2b3f77b9cb235e9817ee8c7fe983b377feb8 /sensors/aidl/default/multihal/HalProxyAidl.cpp | |
parent | 2c19304e56e71ea7275a662dbf921fc8b437c41a (diff) |
Implements AIDL multi-HAL debug dump
Bug: 228645167
Test: adb shell dumpsys android.hardware.sensors.ISensors/default
Change-Id: If5985d669d5fae6ca99d0156f61841f868c8c60f
Diffstat (limited to 'sensors/aidl/default/multihal/HalProxyAidl.cpp')
-rw-r--r-- | sensors/aidl/default/multihal/HalProxyAidl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sensors/aidl/default/multihal/HalProxyAidl.cpp b/sensors/aidl/default/multihal/HalProxyAidl.cpp index 64805e6638..327db124c8 100644 --- a/sensors/aidl/default/multihal/HalProxyAidl.cpp +++ b/sensors/aidl/default/multihal/HalProxyAidl.cpp @@ -206,6 +206,18 @@ static ::android::hardware::sensors::V1_0::SharedMemInfo convertSharedMemInfo( resultToBinderStatus(HalProxy::unregisterDirectChannel(in_channelHandle))); } +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 */); + + native_handle_delete(nativeHandle); + return STATUS_OK; +} + } // namespace implementation } // namespace sensors } // namespace hardware |