Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c420b66 authored by Chris Kuiper's avatar Chris Kuiper
Browse files

HalProxy: Forward 'lshal debug' options.

Bug: 262655635
Test: Temporarily added logs to verify option arguments are correctly
      forwarded.

Change-Id: Idef9b3371c332b8578cbfa88ba7d4bf4c68155e3
parent 1781b8f3
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -351,7 +351,7 @@ Return<void> HalProxy::configDirectReport(int32_t sensorHandle, int32_t channelH
    return Return<void>();
    return Return<void>();
}
}


Return<void> HalProxy::debug(const hidl_handle& fd, const hidl_vec<hidl_string>& /*args*/) {
Return<void> HalProxy::debug(const hidl_handle& fd, const hidl_vec<hidl_string>& args) {
    if (fd.getNativeHandle() == nullptr || fd->numFds < 1) {
    if (fd.getNativeHandle() == nullptr || fd->numFds < 1) {
        ALOGE("%s: missing fd for writing", __FUNCTION__);
        ALOGE("%s: missing fd for writing", __FUNCTION__);
        return Void();
        return Void();
@@ -385,7 +385,7 @@ Return<void> HalProxy::debug(const hidl_handle& fd, const hidl_vec<hidl_string>&
        stream << "  Name: " << subHal->getName() << std::endl;
        stream << "  Name: " << subHal->getName() << std::endl;
        stream << "  Debug dump: " << std::endl;
        stream << "  Debug dump: " << std::endl;
        android::base::WriteStringToFd(stream.str(), writeFd);
        android::base::WriteStringToFd(stream.str(), writeFd);
        subHal->debug(fd, {});
        subHal->debug(fd, args);
        stream.str("");
        stream.str("");
        stream << std::endl;
        stream << std::endl;
    }
    }