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

Commit 623ebc0d authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Automerger Merge Worker
Browse files

Merge "Remove non-functioning 'DevicesFactoryHalInterface::getHalPids'" into main am: 7a4a0fc5

parents 15f94806 7a4a0fc5
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -114,15 +114,6 @@ status_t DevicesFactoryHalAidl::openDevice(const char *name, sp<DeviceHalInterfa
    return OK;
}

status_t DevicesFactoryHalAidl::getHalPids(std::vector<pid_t> *pids) {
    if (pids == nullptr) {
        return BAD_VALUE;
    }
    // Retrieval of HAL pids requires "list services" permission which is not granted
    // to the audio server. This job is performed by AudioService (in Java) instead.
    return PERMISSION_DENIED;
}

status_t DevicesFactoryHalAidl::setCallbackOnce(sp<DevicesFactoryHalCallback> callback) {
    // Dynamic registration of module instances is not supported. The functionality
    // in the audio server which is related to this callback can be removed together
+0 −2
Original line number Diff line number Diff line
@@ -35,8 +35,6 @@ class DevicesFactoryHalAidl : public DevicesFactoryHalInterface
    // necessary to release references to the returned object.
    status_t openDevice(const char *name, sp<DeviceHalInterface> *device) override;

    status_t getHalPids(std::vector<pid_t> *pids) override;

    status_t setCallbackOnce(sp<DevicesFactoryHalCallback> callback) override;

    android::detail::AudioHalVersionInfo getHalVersion() const override;
+0 −23
Original line number Diff line number Diff line
@@ -163,29 +163,6 @@ status_t DevicesFactoryHalHidl::openDevice(const char *name, sp<DeviceHalInterfa
    return BAD_VALUE;
}

status_t DevicesFactoryHalHidl::getHalPids(std::vector<pid_t> *pids) {
    std::set<pid_t> pidsSet;
    auto factories = copyDeviceFactories();
    for (const auto& factory : factories) {
        using ::android::hidl::base::V1_0::DebugInfo;

        DebugInfo debugInfo;
        auto ret = factory->getDebugInfo([&] (const auto &info) {
               debugInfo = info;
            });
        if (!ret.isOk()) {
           return INVALID_OPERATION;
        }
        if (debugInfo.pid == (int)IServiceManager::PidConstant::NO_PID) {
            continue;
        }
        pidsSet.insert(debugInfo.pid);
    }

    *pids = {pidsSet.begin(), pidsSet.end()};
    return NO_ERROR;
}

status_t DevicesFactoryHalHidl::setCallbackOnce(sp<DevicesFactoryHalCallback> callback) {
    ALOG_ASSERT(callback != nullptr);
    bool needToCallCallback = false;
+0 −2
Original line number Diff line number Diff line
@@ -43,8 +43,6 @@ class DevicesFactoryHalHidl : public DevicesFactoryHalInterface
    // necessary to release references to the returned object.
    status_t openDevice(const char *name, sp<DeviceHalInterface> *device) override;

    status_t getHalPids(std::vector<pid_t> *pids) override;

    status_t setCallbackOnce(sp<DevicesFactoryHalCallback> callback) override;

    android::detail::AudioHalVersionInfo getHalVersion() const override;
+0 −2
Original line number Diff line number Diff line
@@ -42,8 +42,6 @@ class DevicesFactoryHalInterface : public RefBase
    // necessary to release references to the returned object.
    virtual status_t openDevice(const char *name, sp<DeviceHalInterface> *device) = 0;

    virtual status_t getHalPids(std::vector<pid_t> *pids) = 0;

    // Sets a DevicesFactoryHalCallback to notify the client.
    // The callback can be only set once.
    virtual status_t setCallbackOnce(sp<DevicesFactoryHalCallback> callback) = 0;
Loading