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

Commit eca6b3f0 authored by Justin Yun's avatar Justin Yun Committed by android-build-merger
Browse files

Merge "libvndksupport: Do not lookup default namespace for sphal failure" into oc-dev

am: 14774317

Change-Id: Ic3e36ba95d124428e352f396812e700e634a1333
parents ae97799e 14774317
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -30,21 +30,17 @@ void* android_load_sphal_library(const char* name, int flag) {
            .flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = sphal_namespace,
        };
        void* handle = android_dlopen_ext(name, flag, &dlextinfo);
        if (handle) {
            return handle;
        } else {
            ALOGW(
                "Could not load %s from sphal namespace: %s. "
                "Falling back to loading it from the current namespace,",
                name, dlerror());
        if (!handle) {
            ALOGE("Could not load %s from sphal namespace: %s.", name, dlerror());
        }
        return handle;
    } else {
        ALOGI(
            "sphal namespace is not configured for this process. "
            "Loading %s from the current namespace instead.",
            name);
    }
        return dlopen(name, flag);
    }
}

int android_unload_sphal_library(void* handle) { return dlclose(handle); }