diff options
author | 2016-03-15 14:47:29 +0000 | |
---|---|---|
committer | 2016-03-16 11:45:26 +0000 | |
commit | f525272b1edec721058e7d888545dd5d97b5045d (patch) | |
tree | 3ffb17542553c7b18c4aac0e5ab9859c202b6ad5 /runtime/openjdkjvm/OpenjdkJvm.cc | |
parent | bc20209fcd8859fdade71fd1cc27cb8576d6da55 (diff) |
runtime: delete native/java_lang_Runtime.cc
We're now using Runtime.c from ojluni, which does the same set
of things via the JVM interface. This removes unnecessary duplication
of code between Runtime.cc and OpenJdkJvm.cc.
Also includes a few changes to JVM_NativeLoad to bring it in sync
with the version in Runtime.cc.
bug: 27387202
(cherry picked from commit 5f97157263d1b52bf4aea523b28294b21d694da1)
Change-Id: Ic2848755505a0cb25da8237150b07dadf0a42929
Diffstat (limited to 'runtime/openjdkjvm/OpenjdkJvm.cc')
-rw-r--r-- | runtime/openjdkjvm/OpenjdkJvm.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/openjdkjvm/OpenjdkJvm.cc b/runtime/openjdkjvm/OpenjdkJvm.cc index d377457eb2..aff9b61f3a 100644 --- a/runtime/openjdkjvm/OpenjdkJvm.cc +++ b/runtime/openjdkjvm/OpenjdkJvm.cc @@ -342,15 +342,15 @@ JNIEXPORT jstring JVM_NativeLoad(JNIEnv* env, // Starting with N nativeLoad uses classloader local // linker namespace instead of global LD_LIBRARY_PATH - // (23 is Marshmallow) - if (target_sdk_version <= 23) { + // (23 is Marshmallow). This call is here to preserve + // backwards compatibility for the apps targeting sdk + // version <= 23 + if (target_sdk_version == 0) { SetLdLibraryPath(env, javaLibrarySearchPath); } std::string error_msg; { - art::ScopedObjectAccess soa(env); - art::StackHandleScope<1> hs(soa.Self()); art::JavaVMExt* vm = art::Runtime::Current()->GetJavaVM(); bool success = vm->LoadNativeLibrary(env, filename.c_str(), |