Add VMRuntime.setDedupeHiddenApiWarnings().
This exposes the equivalently named functionality in arts Runtime class.
Test: m
Bug: 78268765
Merged-In: If5b2fff70a079d588ae3bba706ab7f572afac0b2
Change-Id: If5b2fff70a079d588ae3bba706ab7f572afac0b2
(cherry picked from commit 80900a3c6746a64b17121734af776f49f0570723)
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc
index 264f657..e88ff09 100644
--- a/runtime/native/dalvik_system_VMRuntime.cc
+++ b/runtime/native/dalvik_system_VMRuntime.cc
@@ -682,6 +682,12 @@
#endif
}
+static void VMRuntime_setDedupeHiddenApiWarnings(JNIEnv* env ATTRIBUTE_UNUSED,
+ jclass klass ATTRIBUTE_UNUSED,
+ jboolean dedupe) {
+ Runtime::Current()->SetDedupeHiddenApiWarnings(dedupe);
+}
+
static JNINativeMethod gMethods[] = {
FAST_NATIVE_METHOD(VMRuntime, addressOf, "(Ljava/lang/Object;)J"),
NATIVE_METHOD(VMRuntime, bootClassPath, "()Ljava/lang/String;"),
@@ -723,6 +729,7 @@
NATIVE_METHOD(VMRuntime, getCurrentInstructionSet, "()Ljava/lang/String;"),
NATIVE_METHOD(VMRuntime, didPruneDalvikCache, "()Z"),
NATIVE_METHOD(VMRuntime, setSystemDaemonThreadPriority, "()V"),
+ NATIVE_METHOD(VMRuntime, setDedupeHiddenApiWarnings, "(Z)V"),
};
void register_dalvik_system_VMRuntime(JNIEnv* env) {