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
Change-Id: I92aac81d131661aca588e352aee7a167593e17d4
diff --git a/runtime/openjdkjvm/OpenjdkJvm.cc b/runtime/openjdkjvm/OpenjdkJvm.cc
index d377457..aff9b61 100644
--- a/runtime/openjdkjvm/OpenjdkJvm.cc
+++ b/runtime/openjdkjvm/OpenjdkJvm.cc
@@ -342,15 +342,15 @@
// 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(),