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

Commit fb3c1fb5 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 4425573 from a727b1c9 to pi-release

Change-Id: I8e03d7e0135831f03cd121933b0ea3d1e50c796f
parents 66cc8fd9 a727b1c9
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -44,14 +44,14 @@ dispatchTable loadHAL() {
    const char* filename = "libRS_internal.so";
    // Try to load libRS_internal.so from the "rs" namespace directly.
    typedef struct android_namespace_t* (*GetExportedNamespaceFnPtr)(const char*);
    GetExportedNamespaceFnPtr getExportedNamespace =
        (GetExportedNamespaceFnPtr)dlsym(RTLD_DEFAULT, "android_get_exported_namespace");
    GetExportedNamespaceFnPtr getExportedNamespace = reinterpret_cast<GetExportedNamespaceFnPtr>(
        dlsym(RTLD_DEFAULT, "android_get_exported_namespace"));
    void* handle = nullptr;
    if (getExportedNamespace != nullptr) {
        android_namespace_t* rs_namespace = getExportedNamespace("rs");
        if (rs_namespace != nullptr) {
        android_namespace_t* rsNamespace = getExportedNamespace("rs");
        if (rsNamespace != nullptr) {
            const android_dlextinfo dlextinfo = {
                .flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = rs_namespace,
                .flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = rsNamespace,
            };
            handle = android_dlopen_ext(filename, RTLD_LAZY | RTLD_LOCAL, &dlextinfo);
        }