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

Commit cb5a1abe authored by Yifan Hong's avatar Yifan Hong
Browse files

lshal: Use vintf::FqInstance for VINTF APIs.

libvintf stops using and depending on android::FqInstance. Convert
objects to android::vintf::FqInstance before feeding into libvintf
APIs.

Test: TH
Bug: 264267049
Change-Id: I5c8e640cac537c81e8eb7d0dc9ab6d68cf2cef0b
parent 1c5aa9cb
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -353,8 +353,16 @@ bool ListCommand::addEntryWithInstance(const TableEntry& entry,
        return false;
    }

    auto vintfFqInstance = vintf::FqInstance::from(fqInstance.string());
    if (!vintfFqInstance.has_value()) {
        err() << "Unable to convert " << fqInstance.string() << " to vintf::FqInstance"
              << std::endl;
        return false;
    }

    std::string e;
    if (!manifest->insertInstance(fqInstance, entry.transport, arch, vintf::HalFormat::HIDL, &e)) {
    if (!manifest->insertInstance(*vintfFqInstance, entry.transport, arch, vintf::HalFormat::HIDL,
                                  &e)) {
        err() << "Warning: Cannot insert '" << fqInstance.string() << ": " << e << std::endl;
        return false;
    }