publicclass Main { publicstaticvoid main(String[] args) throws ClassNotFoundException {
System.loadLibrary(args[0]);
// Run the initialization routine. This will enable hidden API checks in // the runtime, in case they are not enabled by default.
init();
// Load the '-ex' APK and attach it to the boot class path.
appendToBootClassLoader(DEX_EXTRA, /* isCorePlatform */ false);
// Find the test class in boot class loader and verify that its members are hidden. Class<?> klass = Class.forName("art.Test2038", true, BOOT_CLASS_LOADER);
assertFieldIsHidden(klass, "before set-policy");
assertMethodIsHidden(klass, "before set-policy");
int old_policy = disablePolicy();
// Verify that the class members are not hidden.
assertFieldNotHidden(klass, "after disable-policy");
assertMethodNotHidden(klass, "after disable-policy");
// Native functions. Note that these are implemented in 674-hiddenapi/hiddenapi.cc. privatestaticnativevoid appendToBootClassLoader(String dexPath, boolean isCorePlatform); privatestaticnativevoid init();
// Native function implemented in hiddenapi_ext.cc privatestaticnativeint setPolicy(int new_policy); privatestaticnativeint disablePolicy();
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.