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

Commit cf148e1e authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "lshal: separate timeout for hwservicemanager list" am: 180bb926

am: b67f970c

Change-Id: I6f240558cf45aa840abea2aed5af5ec559f7b209
parents f114e0f7 b67f970c
Loading
Loading
Loading
Loading
+68 −64
Original line number Original line 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::manager::V1_0;
    using namespace ::android::hidl::base::V1_0;
    using namespace ::android::hidl::base::V1_0;
    const std::string mode = "hwbinder";
    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;
    Status status = OK;
    auto listRet = timeoutIPC(manager, &IServiceManager::list, [&] (const auto &fqInstanceNames) {
    // server pid, .ptr value of binder object, child pids
    // server pid, .ptr value of binder object, child pids
    std::map<std::string, DebugInfo> allDebugInfos;
    std::map<std::string, DebugInfo> allDebugInfos;
    std::map<pid_t, std::map<uint64_t, Pids>> allPids;
    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]
                    ? 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;
    return status;
}
}