Add updateProcessState to VMRuntime
updateProcessState is called from the ActivityManager. It is used in ART
to help determine GC behavior.
Change-Id: I65662708ffd8443fff0c3d0e320bf8922e22d7cf
diff --git a/vm/native/dalvik_system_VMRuntime.cpp b/vm/native/dalvik_system_VMRuntime.cpp
index 714878c..bbda1f0 100644
--- a/vm/native/dalvik_system_VMRuntime.cpp
+++ b/vm/native/dalvik_system_VMRuntime.cpp
@@ -230,6 +230,13 @@
RETURN_VOID();
}
+static void Dalvik_dalvik_system_VMRuntime_updateProcessState(const u4* args,
+ JValue* pResult) {
+ // updateProcessState is used in ART to help determine GC behavior. Currently
+ // in Dalvik we don't use process states for anything.
+ RETURN_VOID();
+}
+
const DalvikNativeMethod dvm_dalvik_system_VMRuntime[] = {
{ "addressOf", "(Ljava/lang/Object;)J",
Dalvik_dalvik_system_VMRuntime_addressOf },
@@ -263,5 +270,7 @@
Dalvik_dalvik_system_VMRuntime_registerNativeAllocation },
{ "registerNativeFree", "(I)V",
Dalvik_dalvik_system_VMRuntime_registerNativeFree },
+ { "updateProcessState", "(I)V",
+ Dalvik_dalvik_system_VMRuntime_updateProcessState },
{ NULL, NULL, NULL },
};