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

Commit 3f644e74 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "use android_load_library instead of dlopen when loading vendor lib"

parents 82f633d4 588ddb06
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ cc_library_shared {
        "libhidlmemory",
        "libhidltransport",
        "libnativewindow", // TODO(b/62923479): use header library
        "libvndksupport",
        "android.hidl.memory@1.0",
        "android.hidl.token@1.0-utils",
        "android.hardware.media@1.0",
+3 −1
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@
#include <media/stagefright/omx/SoftOMXPlugin.h>
#include <media/stagefright/foundation/ADebug.h>

#include <vndksupport/linker.h>

#include <dlfcn.h>
#include <fcntl.h>

@@ -67,7 +69,7 @@ void OMXMaster::addVendorPlugin() {
}

void OMXMaster::addPlugin(const char *libname) {
    mVendorLibHandle = dlopen(libname, RTLD_NOW);
    mVendorLibHandle = android_load_sphal_library(libname, RTLD_NOW);

    if (mVendorLibHandle == NULL) {
        return;