Rename meta-reflection changeid
Use a more inclusive terminology to describe the meta-reflection
preventing changeid.
Test: art/test/testrunner/testrunner.py --target -t674-hiddenapi
Bug: 162318095
Change-Id: I4fde31aa41a9cf506c509b223b9f28d9da11cf8a
diff --git a/runtime/native/java_lang_Class.cc b/runtime/native/java_lang_Class.cc
index 7ea0746..4443045 100644
--- a/runtime/native/java_lang_Class.cc
+++ b/runtime/native/java_lang_Class.cc
@@ -56,9 +56,9 @@
namespace art {
-// Should be the same as dalvik.system.VMRuntime.PREVENT_META_REFLECTION_BLACKLIST_ACCESS.
+// Should be the same as dalvik.system.VMRuntime.PREVENT_META_REFLECTION_BLOCKLIST_ACCESS.
// Corresponds to a bug id.
-static constexpr uint64_t kPreventMetaReflectionBlacklistAccess = 142365358;
+static constexpr uint64_t kPreventMetaReflectionBlocklistAccess = 142365358;
// Walks the stack, finds the caller of this reflective call and returns
// a hiddenapi AccessContext formed from its declaring class.
@@ -105,7 +105,7 @@
// (e.g. in 691-hiddenapi-proxy).
ObjPtr<mirror::Class> proxy_class = GetClassRoot<mirror::Proxy>();
if (declaring_class->IsInSamePackage(proxy_class) && declaring_class != proxy_class) {
- if (Runtime::Current()->isChangeEnabled(kPreventMetaReflectionBlacklistAccess)) {
+ if (Runtime::Current()->isChangeEnabled(kPreventMetaReflectionBlocklistAccess)) {
return true;
}
}
diff --git a/test/674-hiddenapi/hiddenapi.cc b/test/674-hiddenapi/hiddenapi.cc
index 742b6b3..132df74 100644
--- a/test/674-hiddenapi/hiddenapi.cc
+++ b/test/674-hiddenapi/hiddenapi.cc
@@ -27,8 +27,8 @@
namespace art {
namespace Test674HiddenApi {
-// Should be the same as dalvik.system.VMRuntime.PREVENT_META_REFLECTION_BLACKLIST_ACCESS
-static constexpr uint64_t kPreventMetaReflectionBlacklistAccess = 142365358;
+// Should be the same as dalvik.system.VMRuntime.PREVENT_META_REFLECTION_BLOCKLIST_ACCESS
+static constexpr uint64_t kPreventMetaReflectionBlocklistAccess = 142365358;
std::vector<std::vector<std::unique_ptr<const DexFile>>> opened_dex_files;
@@ -324,10 +324,10 @@
std::set<uint64_t> disabled_changes = Runtime::Current()->GetDisabledCompatChanges();
if (value == JNI_TRUE) {
// If hidden api check hardening is enabled, remove it from the set of disabled changes.
- disabled_changes.erase(kPreventMetaReflectionBlacklistAccess);
+ disabled_changes.erase(kPreventMetaReflectionBlocklistAccess);
} else {
// If hidden api check hardening is disabled, add it to the set of disabled changes.
- disabled_changes.insert(kPreventMetaReflectionBlacklistAccess);
+ disabled_changes.insert(kPreventMetaReflectionBlocklistAccess);
}
Runtime::Current()->SetDisabledCompatChanges(disabled_changes);
}