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

Commit 502998c8 authored by Nicolas Geoffray's avatar Nicolas Geoffray Committed by android-build-merger
Browse files

Merge "Move to C API of libnativeloader." am: 9bc4066b

am: 634d1e1f

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


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


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