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

Commit 75e35134 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Fix log spam: Failed to open libwvm.so

Bug: 7342813
Change-Id: I98852f036e4679a653723fc2bf1435d6e9d7d34c
parent 0342e9a3
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -72,15 +72,18 @@ WVMExtractor::WVMExtractor(const sp<DataSource> &source)
    }
}

bool WVMExtractor::getVendorLibHandle()
static void init_routine()
{
    if (gVendorLibHandle == NULL) {
    gVendorLibHandle = dlopen("libwvm.so", RTLD_NOW);
    }

    if (gVendorLibHandle == NULL) {
        ALOGE("Failed to open libwvm.so");
    }
}

bool WVMExtractor::getVendorLibHandle()
{
    static pthread_once_t sOnceControl = PTHREAD_ONCE_INIT;
    pthread_once(&sOnceControl, init_routine);

    return gVendorLibHandle != NULL;
}