Fix a few non-inclusive terms
Largely based on go/hiddenapi-list-renaming
Bug: 161336379
Test: TH
Change-Id: Iaa06eed26ab0cb9bb4e2995a148f3251386ad33d
diff --git a/libartbase/base/hiddenapi_flags.h b/libartbase/base/hiddenapi_flags.h
index 3ece966..64d3fae 100644
--- a/libartbase/base/hiddenapi_flags.h
+++ b/libartbase/base/hiddenapi_flags.h
@@ -75,7 +75,7 @@
/*
* This class represents the information whether a field/method is in
- * public API (whitelist) or if it isn't, apps targeting which SDK
+ * public API (SDK) or if it isn't, apps targeting which SDK
* versions are allowed to access it.
*/
class ApiList {
diff --git a/libnativeloader/library_namespaces.cpp b/libnativeloader/library_namespaces.cpp
index 585e98a..f31c430 100644
--- a/libnativeloader/library_namespaces.cpp
+++ b/libnativeloader/library_namespaces.cpp
@@ -78,7 +78,7 @@
// (http://b/27588281) This is a workaround for apps using custom classloaders and calling
// System.load() with an absolute path which is outside of the classloader library search path.
// This list includes all directories app is allowed to access this way.
-constexpr const char* kWhitelistedDirectories = "/data:/mnt/expand";
+constexpr const char* kAlwaysPermittedDirectories = "/data:/mnt/expand";
constexpr const char* kVendorLibPath = "/vendor/" LIB;
constexpr const char* kProductLibPath = "/product/" LIB ":/system/product/" LIB;
@@ -216,7 +216,7 @@
//
// This part effectively allows such a classloader to access anything
// under /data and /mnt/expand
- std::string permitted_path = kWhitelistedDirectories;
+ std::string permitted_path = kAlwaysPermittedDirectories;
if (java_permitted_path != nullptr) {
ScopedUtfChars path(env, java_permitted_path);
diff --git a/runtime/art_method.cc b/runtime/art_method.cc
index 89dc93b..2d7129a 100644
--- a/runtime/art_method.cc
+++ b/runtime/art_method.cc
@@ -696,7 +696,7 @@
DCHECK_EQ(is_compilable, IsCompilable());
DCHECK_EQ(must_count_locks, MustCountLocks());
// Only DCHECK that we have preserved the hidden API access flags if the
- // original method was not on the whitelist. This is because the core image
+ // original method was not in the SDK list. This is because the core image
// does not have the access flags set (b/77733081).
if ((hiddenapi_flags & kAccHiddenapiBits) != kAccPublicApi) {
DCHECK_EQ(hiddenapi_flags, hiddenapi::GetRuntimeFlags(this)) << PrettyMethod();
diff --git a/runtime/interpreter/unstarted_runtime.cc b/runtime/interpreter/unstarted_runtime.cc
index 831c1dd..de9e965 100644
--- a/runtime/interpreter/unstarted_runtime.cc
+++ b/runtime/interpreter/unstarted_runtime.cc
@@ -1084,7 +1084,7 @@
"void java.lang.Thread.<init>()",
"void java.util.logging.LogManager$Cleaner.<init>("
"java.util.logging.LogManager)" })) {
- // Whitelist LogManager$Cleaner, which is an unstarted Thread (for a shutdown hook). The
+ // Allow list LogManager$Cleaner, which is an unstarted Thread (for a shutdown hook). The
// Thread constructor only asks for the current thread to set up defaults and add the
// thread as unstarted to the ThreadGroup. A faked-up main thread peer is good enough for
// these purposes.
@@ -1120,7 +1120,7 @@
"void java.lang.Thread.<init>()",
"void java.util.logging.LogManager$Cleaner.<init>("
"java.util.logging.LogManager)" })) {
- // Whitelist reading the state of the "main" thread when creating another (unstarted) thread
+ // Allow list reading the state of the "main" thread when creating another (unstarted) thread
// for LogManager. Report the thread as "new" (it really only counts that it isn't terminated).
constexpr int32_t kJavaRunnable = 1;
result->SetI(kJavaRunnable);
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 02bb358..2dd022e 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -1374,8 +1374,8 @@
// Whether access checks on test API should be performed.
hiddenapi::EnforcementPolicy test_api_policy_;
- // List of signature prefixes of methods that have been removed from the blacklist, and treated
- // as if whitelisted.
+ // List of signature prefixes of methods that have been removed from the blocklist, and treated
+ // as if SDK.
std::vector<std::string> hidden_api_exemptions_;
// Do not warn about the same hidden API access violation twice.
diff --git a/test/661-oat-writer-layout/run b/test/661-oat-writer-layout/run
index 99e78af..087cd20 100644
--- a/test/661-oat-writer-layout/run
+++ b/test/661-oat-writer-layout/run
@@ -16,7 +16,7 @@
# Always use the 'profile'.
# Note that this test only works with --compiler-filter=speed
-# -- we accomplish this by blacklisting other compiler variants
+# -- we accomplish this by blocklisting other compiler variants
# and we also have to pass the option explicitly as dex2oat
# defaults to speed-profile if a profile is specified.
"${RUN}" "$@" --profile -Xcompiler-option --compiler-filter=speed
diff --git a/test/674-hiddenapi/run b/test/674-hiddenapi/run
index b57d10a..0ab4763 100755
--- a/test/674-hiddenapi/run
+++ b/test/674-hiddenapi/run
@@ -18,5 +18,5 @@
# methods at runtime.
#
# N.B. Compilation of secondary dexes can prevent hidden API checks, e.g. if
-# a blacklisted field get is inlined.
+# a blocklisted field get is inlined.
exec ${RUN} $@ --verify-soft-fail --no-secondary-compilation
diff --git a/test/674-hiddenapi/src-art/Main.java b/test/674-hiddenapi/src-art/Main.java
index 13c4e81..bfde4f7 100644
--- a/test/674-hiddenapi/src-art/Main.java
+++ b/test/674-hiddenapi/src-art/Main.java
@@ -63,7 +63,7 @@
doTest(DexDomain.Platform, DexDomain.Application, false);
doUnloading();
- // Now run the same test again, but with the blacklist exmemptions list set
+ // Now run the same test again, but with the blocklist exemptions list set
// to "L" which matches everything.
doTest(DexDomain.Platform, DexDomain.Application, true);
doUnloading();
diff --git a/test/988-method-trace/gen_srcs.py b/test/988-method-trace/gen_srcs.py
index 697b17f..728074b 100755
--- a/test/988-method-trace/gen_srcs.py
+++ b/test/988-method-trace/gen_srcs.py
@@ -38,10 +38,10 @@
IDX_CLASS_NAME = -3
# Exclude all hidden API.
-KLASS_BLACK_LIST = ['sun.misc.Unsafe', 'libcore.io.Memory', 'java.lang.StringFactory',
+KLASS_BLOCK_LIST = ['sun.misc.Unsafe', 'libcore.io.Memory', 'java.lang.StringFactory',
'java.lang.invoke.MethodHandle', # invokes are tested by 956-method-handles
'java.lang.invoke.VarHandle' ] # TODO(b/65872996): will tested separately
-METHOD_BLACK_LIST = [('java.lang.ref.Reference', 'getReferent'),
+METHOD_BLOCK_LIST = [('java.lang.ref.Reference', 'getReferent'),
('java.lang.String', 'getCharsNoCheck'),
('java.lang.System', 'arraycopy')] # arraycopy has a manual test.
@@ -201,12 +201,12 @@
def placeholder_instance_value(self):
return KLASS_INSTANCE_INITIALIZERS.get(self.klass, 'new %s()' %(self.klass))
- def is_blacklisted(self):
- for blk in KLASS_BLACK_LIST:
+ def is_blocklisted(self):
+ for blk in KLASS_BLOCK_LIST:
if self.klass.startswith(blk):
return True
- return (self.klass, self.method_name) in METHOD_BLACK_LIST
+ return (self.klass, self.method_name) in METHOD_BLOCK_LIST
# parse the V(...) \ list of items into a MethodInfo
def parse_method_info(items):
@@ -293,8 +293,8 @@
initialize_klass_dict = collections.OrderedDict()
for i in parse_all_method_infos():
debug_print(i)
- if i.is_blacklisted():
- debug_print("Blacklisted: " + str(i))
+ if i.is_blocklisted():
+ debug_print("Blocklisted: " + str(i))
continue
call_str = format_call_to(i)
diff --git a/tools/hiddenapi/hiddenapi.cc b/tools/hiddenapi/hiddenapi.cc
index 7954fa4..a4072ed 100644
--- a/tools/hiddenapi/hiddenapi.cc
+++ b/tools/hiddenapi/hiddenapi.cc
@@ -1111,7 +1111,7 @@
boot_members[boot_member.GetApiEntry()] = {kExcludeFromOutput};
});
- // Resolve each SDK dex member against the framework and mark it white.
+ // Resolve each SDK dex member against the framework and mark it as SDK.
for (const auto& cp_entry : stub_classpaths_) {
// Ignore any empty stub jars as it just means that they provide no APIs
// for the current kind, e.g. framework-sdkextensions does not provide
diff --git a/tools/veridex/README.md b/tools/veridex/README.md
index ab446c0..6c7b934 100644
--- a/tools/veridex/README.md
+++ b/tools/veridex/README.md
@@ -1,7 +1,8 @@
appcompat.sh
============
-Given an APK, finds API uses that fall into the blacklist/greylists APIs.
+Given an APK, finds API uses that fall into the
+blocklist/max-target-X/unsupported APIs.
NOTE: appcompat.sh is still under development. It can report
API uses that do not execute at runtime, and reflection uses
diff --git a/tools/veridex/appcompat.sh b/tools/veridex/appcompat.sh
index 8cbec92..f2769a6 100755
--- a/tools/veridex/appcompat.sh
+++ b/tools/veridex/appcompat.sh
@@ -70,7 +70,7 @@
extra_flags="--api-flags=$file"
fi
-# If --exclude-api-lists is not passed directly, exclude whitelist APIs.
+# If --exclude-api-lists is not passed directly, exclude SDK APIs.
if [[ "$@" != "*--exclude-api-lists=*" ]]; then
extra_flags="${extra_flags} --exclude-api-lists=sdk,invalid"
fi