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

Commit 9945e437 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "libaudiohal: Fix probing of the AIDL HAL presence"

parents 1753209c e99c6637
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -105,12 +105,12 @@ bool createHalService(const AudioHalVersionInfo& version, bool isDevice, void**

bool hasAidlHalService(const InterfaceName& interface, const AudioHalVersionInfo& version) {
    const std::string name = interface.first + "." + interface.second + "/default";
    AIBinder* binder = AServiceManager_checkService(name.c_str());
    if (binder == nullptr) {
        ALOGW("%s Service %s doesn't exist", __func__, name.c_str());
    const bool isDeclared = AServiceManager_isDeclared(name.c_str());
    if (!isDeclared) {
        ALOGW("%s %s: false", __func__, name.c_str());
        return false;
    }
    ALOGI("%s AIDL Service %s exist: %s", __func__, name.c_str(), version.toString().c_str());
    ALOGI("%s %s: true, version %s", __func__, name.c_str(), version.toString().c_str());
    return true;
}