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

Commit 180bb926 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "lshal: separate timeout for hwservicemanager list"

parents 09ab3783 9b5c15d2
Loading
Loading
Loading
Loading
+68 −64
Original line number Diff line number Diff line
@@ -262,8 +262,19 @@ Status Lshal::fetchBinderized(const sp<IServiceManager> &manager) {
    using namespace ::android::hidl::manager::V1_0;
    using namespace ::android::hidl::base::V1_0;
    const std::string mode = "hwbinder";

    hidl_vec<hidl_string> fqInstanceNames;
    // copying out for timeoutIPC
    auto listRet = timeoutIPC(manager, &IServiceManager::list, [&] (const auto &names) {
        fqInstanceNames = names;
    });
    if (!listRet.isOk()) {
        mErr << "Error: Failed to list services for " << mode << ": "
             << listRet.description() << std::endl;
        return DUMP_BINDERIZED_ERROR;
    }

    Status status = OK;
    auto listRet = timeoutIPC(manager, &IServiceManager::list, [&] (const auto &fqInstanceNames) {
    // server pid, .ptr value of binder object, child pids
    std::map<std::string, DebugInfo> allDebugInfos;
    std::map<pid_t, std::map<uint64_t, Pids>> allPids;
@@ -329,13 +340,6 @@ Status Lshal::fetchBinderized(const sp<IServiceManager> &manager) {
                    ? Pids{} : allPids[info.pid][info.ptr]
        });
    }

    });
    if (!listRet.isOk()) {
        mErr << "Error: Failed to list services for " << mode << ": "
             << listRet.description() << std::endl;
        status |= DUMP_BINDERIZED_ERROR;
    }
    return status;
}