diff options
author | Elliott Hughes <enh@google.com> | 2013-08-02 16:49:57 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-08-02 16:49:57 -0700 |
commit | d04ecb0b450c0c7a059ee355f6aed7c9f65b671e (patch) | |
tree | 08714a7f358c1ccc3c7b4e1469c4aa2ae86739d0 /vm/Native.cpp | |
parent | 8c82bcccdf3f179a8e5d7fe2753e212a88e20dd6 (diff) | |
download | android_dalvik-d04ecb0b450c0c7a059ee355f6aed7c9f65b671e.tar.gz android_dalvik-d04ecb0b450c0c7a059ee355f6aed7c9f65b671e.tar.bz2 android_dalvik-d04ecb0b450c0c7a059ee355f6aed7c9f65b671e.zip |
Returning JNI_ERR from JNI_OnLoad is still an error!
Fixes a bug introduced in the previous patch.
Change-Id: I34ea63d323a0125c3c4ae140a2ae9b8e9ed3e1df
Diffstat (limited to 'vm/Native.cpp')
-rw-r--r-- | vm/Native.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vm/Native.cpp b/vm/Native.cpp index a024db884..02fb46d17 100644 --- a/vm/Native.cpp +++ b/vm/Native.cpp @@ -411,7 +411,7 @@ bool dvmLoadNativeCode(const char* pathName, Object* classLoader, if (verbose) ALOGD("Added shared lib %s %p", pathName, classLoader); - bool result = true; + bool result = false; void* vonLoad; int version; @@ -453,7 +453,8 @@ bool dvmLoadNativeCode(const char* pathName, Object* classLoader, * newly-registered native method calls. We could try to * unregister them, but that doesn't seem worthwhile. */ - result = false; + } else { + result = true; } if (gDvm.verboseJni) { ALOGI("[Returned %s from JNI_OnLoad for \"%s\"]", |