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

Commit 9cd0c702 authored by Nicolas Geoffray's avatar Nicolas Geoffray
Browse files

Move to C API of libnativeloader.

Test: m
Bug: 119840313

Merged-In: Ia2ba3e4ed69d35310838ed57e03dfc122c3579db
(cherry picked from commit 42b30e7a)

Change-Id: Ic357031086b80442b5d3e249fb4fe26b8202ba63
parent 796c9446
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -281,15 +281,18 @@ loadNativeCode_native(JNIEnv* env, jobject clazz, jstring path, jstring funcName
    std::unique_ptr<NativeCode> code;
    bool needs_native_bridge = false;

    char* nativeloader_error_msg = nullptr;
    void* handle = OpenNativeLibrary(env,
                                     sdkVersion,
                                     pathStr.c_str(),
                                     classLoader,
                                     libraryPath,
                                     &needs_native_bridge,
                                     &g_error_msg);
                                     &nativeloader_error_msg);

    if (handle == nullptr) {
        g_error_msg = nativeloader_error_msg;
        NativeLoaderFreeErrorMessage(nativeloader_error_msg);
        ALOGW("NativeActivity LoadNativeLibrary(\"%s\") failed: %s",
              pathStr.c_str(),
              g_error_msg.c_str());