add dalvik.system.VMRuntime.vmLibrary implementation for ART
Change-Id: Ibc1a5abb5a0ee49cb20e55dc2e169a224fcf9d8b
diff --git a/src/native/dalvik_system_VMRuntime.cc b/src/native/dalvik_system_VMRuntime.cc
index 0a2e1a6..ce3cc93 100644
--- a/src/native/dalvik_system_VMRuntime.cc
+++ b/src/native/dalvik_system_VMRuntime.cc
@@ -126,6 +126,10 @@
return env->NewStringUTF(Runtime::Current()->GetVersion());
}
+static jstring VMRuntime_vmLibrary(JNIEnv* env, jobject) {
+ return env->NewStringUTF(kIsDebugBuild ? "libartd.so" : "libart.so");
+}
+
#if !defined(ART_USE_PORTABLE_COMPILER)
static void DisableCheckJniCallback(Thread* t, void*) {
t->GetJniEnv()->SetCheckJniEnabled(false);
@@ -209,6 +213,7 @@
NATIVE_METHOD(VMRuntime, startJitCompilation, "()V"),
NATIVE_METHOD(VMRuntime, trimHeap, "()V"),
NATIVE_METHOD(VMRuntime, vmVersion, "()Ljava/lang/String;"),
+ NATIVE_METHOD(VMRuntime, vmLibrary, "()Ljava/lang/String;"),
};
void register_dalvik_system_VMRuntime(JNIEnv* env) {