Rename ApiList::Value enums
Use a more inclusive terminology for the API lists. This change focuses
specifically on the ApiList::Value enum values. The string equivalents
will be changed separately, as they have multiple extra dependencies.
Bug: 162326106
Test: m
Test: m test-art-host-gtest-art_hiddenapi_tests
Test: art/tools/run-gtests.sh
Change-Id: I1dccf59ecc9e08b60dbd1bfed6ce438b5ce081d0
diff --git a/libartbase/base/hiddenapi_flags.h b/libartbase/base/hiddenapi_flags.h
index 10e58ff..0868d17 100644
--- a/libartbase/base/hiddenapi_flags.h
+++ b/libartbase/base/hiddenapi_flags.h
@@ -86,23 +86,23 @@
enum class Value : uint32_t {
// Values independent of target SDK version of app
- kWhitelist = 0,
- kGreylist = 1,
- kBlacklist = 2,
+ kSdk = 0,
+ kUnsupported = 1,
+ kBlocked = 2,
// Values dependent on target SDK version of app. Put these last as
// their list will be extended in future releases.
// The max release code implicitly includes all maintenance releases,
- // e.g. GreylistMaxO is accessible to targetSdkVersion <= 27 (O_MR1).
- kGreylistMaxO = 3,
- kGreylistMaxP = 4,
- kGreylistMaxQ = 5,
- kGreylistMaxR = 6,
+ // e.g. MaxTargetO is accessible to targetSdkVersion <= 27 (O_MR1).
+ kMaxTargetO = 3,
+ kMaxTargetP = 4,
+ kMaxTargetQ = 5,
+ kMaxTargetR = 6,
// Special values
kInvalid = (static_cast<uint32_t>(-1) & kValueBitMask),
- kMin = kWhitelist,
- kMax = kGreylistMaxR,
+ kMin = kSdk,
+ kMax = kMaxTargetR,
};
// Additional bit flags after the first kValueBitSize bits in dex flags.
@@ -149,13 +149,13 @@
// Maximum SDK versions allowed to access ApiList of given Value.
static constexpr SdkVersion kMaxSdkVersions[] {
- /* whitelist */ SdkVersion::kMax,
- /* greylist */ SdkVersion::kMax,
- /* blacklist */ SdkVersion::kMin,
- /* greylist-max-o */ SdkVersion::kO_MR1,
- /* greylist-max-p */ SdkVersion::kP,
- /* greylist-max-q */ SdkVersion::kQ,
- /* greylist-max-r */ SdkVersion::kR,
+ /* sdk */ SdkVersion::kMax,
+ /* unsupported */ SdkVersion::kMax,
+ /* blocklist */ SdkVersion::kMin,
+ /* max-target-o */ SdkVersion::kO_MR1,
+ /* max-target-p */ SdkVersion::kP,
+ /* max-target-q */ SdkVersion::kQ,
+ /* max-target-r */ SdkVersion::kR,
};
explicit ApiList(Value val, uint32_t domain_apis = 0u)
@@ -191,13 +191,13 @@
}
// Helpers for conveniently constructing ApiList instances.
- static ApiList Whitelist() { return ApiList(Value::kWhitelist); }
- static ApiList Greylist() { return ApiList(Value::kGreylist); }
- static ApiList Blacklist() { return ApiList(Value::kBlacklist); }
- static ApiList GreylistMaxO() { return ApiList(Value::kGreylistMaxO); }
- static ApiList GreylistMaxP() { return ApiList(Value::kGreylistMaxP); }
- static ApiList GreylistMaxQ() { return ApiList(Value::kGreylistMaxQ); }
- static ApiList GreylistMaxR() { return ApiList(Value::kGreylistMaxR); }
+ static ApiList Sdk() { return ApiList(Value::kSdk); }
+ static ApiList Unsupported() { return ApiList(Value::kUnsupported); }
+ static ApiList Blocked() { return ApiList(Value::kBlocked); }
+ static ApiList MaxTargetO() { return ApiList(Value::kMaxTargetO); }
+ static ApiList MaxTargetP() { return ApiList(Value::kMaxTargetP); }
+ static ApiList MaxTargetQ() { return ApiList(Value::kMaxTargetQ); }
+ static ApiList MaxTargetR() { return ApiList(Value::kMaxTargetR); }
static ApiList CorePlatformApi() { return ApiList(DomainApi::kCorePlatformApi); }
static ApiList TestApi() { return ApiList(DomainApi::kTestApi); }
@@ -294,9 +294,9 @@
// Returns true when no ApiList is specified and no domain_api flags either.
bool IsEmpty() const { return (GetValue() == Value::kInvalid) && (GetDomainApis() == 0); }
- // Returns true if the ApiList is on blacklist.
- bool IsBlacklisted() const {
- return GetValue() == Value::kBlacklist;
+ // Returns true if the ApiList is on blocklist.
+ bool IsBlocked() const {
+ return GetValue() == Value::kBlocked;
}
// Returns true if the ApiList is a test API.
diff --git a/runtime/hidden_api.cc b/runtime/hidden_api.cc
index 21a673c..eb7f7b1 100644
--- a/runtime/hidden_api.cc
+++ b/runtime/hidden_api.cc
@@ -40,15 +40,15 @@
static constexpr uint64_t kHideMaxtargetsdkQHiddenApis = 149994052;
// Set to true if we should always print a warning in logcat for all hidden API accesses, not just
-// dark grey and black. This can be set to true for developer preview / beta builds, but should be
-// false for public release builds.
+// conditionally and unconditionally blocked. This can be set to true for developer preview / beta
+// builds, but should be false for public release builds.
// Note that when flipping this flag, you must also update the expectations of test 674-hiddenapi
-// as it affects whether or not we warn for light grey APIs that have been added to the exemptions
+// as it affects whether or not we warn for unsupported APIs that have been added to the exemptions
// list.
static constexpr bool kLogAllAccesses = false;
// Exemptions for logcat warning. Following signatures do not produce a warning as app developers
-// should not be alerted on the usage of these greylised APIs. See b/154851649.
+// should not be alerted on the usage of these unsupported APIs. See b/154851649.
static const std::vector<std::string> kWarningExemptions = {
"Ljava/nio/Buffer;",
"Llibcore/io/Memory;",
@@ -412,7 +412,7 @@
<< "Only proxy classes are expected not to have a class def";
DCHECK(kMemberIsField)
<< "Interface methods should be inspected instead of proxy class methods";
- flags = ApiList::Greylist();
+ flags = ApiList::Unsupported();
} else {
uint32_t member_index = GetMemberDexIndex(member);
auto fn_visit = [&](const AccessorType& dex_member) {
@@ -483,11 +483,11 @@
MemberSignature member_signature(member);
- // Check for an exemption first. Exempted APIs are treated as white list.
+ // Check for an exemption first. Exempted APIs are treated as SDK.
if (member_signature.DoesPrefixMatchAny(runtime->GetHiddenApiExemptions())) {
// Avoid re-examining the exemption list next time.
// Note this results in no warning for the member, which seems like what one would expect.
- // Exemptions effectively adds new members to the whitelist.
+ // Exemptions effectively adds new members to the public API list.
MaybeUpdateAccessFlags(runtime, member, kAccPublicApi);
return false;
}
@@ -514,7 +514,7 @@
}
if (access_method != AccessMethod::kNone) {
- // Warn if non-greylisted signature is being accessed or it is not exempted.
+ // Warn if blocked signature is being accessed or it is not exempted.
if (deny_access || !member_signature.DoesPrefixMatchAny(kWarningExemptions)) {
// Print a log message with information about this class member access.
// We do this if we're about to deny access, or the app is debuggable.
@@ -539,7 +539,7 @@
}
}
- // If this access was not denied, move the member into whitelist and skip
+ // If this access was not denied, flag member as SDK and skip
// the warning the next time the member is accessed.
if (!deny_access) {
MaybeUpdateAccessFlags(runtime, member, kAccPublicApi);
diff --git a/runtime/hidden_api.h b/runtime/hidden_api.h
index 8817c63..1d96184 100644
--- a/runtime/hidden_api.h
+++ b/runtime/hidden_api.h
@@ -38,7 +38,7 @@
enum class EnforcementPolicy {
kDisabled = 0,
kJustWarn = 1, // keep checks enabled, but allow everything (enables logging)
- kEnabled = 2, // ban dark grey & blacklist
+ kEnabled = 2, // ban conditionally blocked & blocklist
kMax = kEnabled,
};
@@ -241,7 +241,7 @@
ApiList api_list(dex_flags);
DCHECK(api_list.IsValid());
- if (api_list.Contains(ApiList::Whitelist())) {
+ if (api_list.Contains(ApiList::Sdk())) {
runtime_flags |= kAccPublicApi;
} else {
// Only add domain-specific flags for non-public API members.
diff --git a/runtime/hidden_api_test.cc b/runtime/hidden_api_test.cc
index c40041b..6e573de 100644
--- a/runtime/hidden_api_test.cc
+++ b/runtime/hidden_api_test.cc
@@ -124,85 +124,85 @@
ScopedObjectAccess soa(self_);
runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kJustWarn);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Whitelist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Greylist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxR()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxQ()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxP()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxO()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blacklist()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), false);
runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
runtime_->SetTargetSdkVersion(
- static_cast<uint32_t>(hiddenapi::ApiList::GreylistMaxO().GetMaxAllowedSdkVersion()));
+ static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion()));
setChangeIdState(kHideMaxtargetsdkPHiddenApis, false);
setChangeIdState(kHideMaxtargetsdkQHiddenApis, false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Whitelist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Greylist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxR()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxQ()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxP()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxO()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blacklist()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true);
runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
runtime_->SetTargetSdkVersion(
- static_cast<uint32_t>(hiddenapi::ApiList::GreylistMaxO().GetMaxAllowedSdkVersion()) + 1);
+ static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion()) + 1);
setChangeIdState(kHideMaxtargetsdkPHiddenApis, false);
setChangeIdState(kHideMaxtargetsdkQHiddenApis, false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Whitelist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Greylist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxR()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxQ()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxP()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxO()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blacklist()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true);
setChangeIdState(kHideMaxtargetsdkQHiddenApis, true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Whitelist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Greylist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxQ()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxP()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxO()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blacklist()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true);
runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
runtime_->SetTargetSdkVersion(
- static_cast<uint32_t>(hiddenapi::ApiList::GreylistMaxP().GetMaxAllowedSdkVersion()) + 1);
+ static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetP().GetMaxAllowedSdkVersion()) + 1);
setChangeIdState(kHideMaxtargetsdkPHiddenApis, true);
setChangeIdState(kHideMaxtargetsdkQHiddenApis, false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Whitelist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Greylist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxR()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxQ()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxP()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxO()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blacklist()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true);
runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
runtime_->SetTargetSdkVersion(
- static_cast<uint32_t>(hiddenapi::ApiList::GreylistMaxQ().GetMaxAllowedSdkVersion()) + 1);
+ static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetQ().GetMaxAllowedSdkVersion()) + 1);
setChangeIdState(kHideMaxtargetsdkPHiddenApis, true);
setChangeIdState(kHideMaxtargetsdkQHiddenApis, true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Whitelist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Greylist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxR()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxQ()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxP()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxO()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blacklist()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true);
runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
runtime_->SetTargetSdkVersion(
- static_cast<uint32_t>(hiddenapi::ApiList::GreylistMaxR().GetMaxAllowedSdkVersion()) + 1);
+ static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetR().GetMaxAllowedSdkVersion()) + 1);
setChangeIdState(kHideMaxtargetsdkPHiddenApis, true);
setChangeIdState(kHideMaxtargetsdkQHiddenApis, true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Whitelist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Greylist()), false);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxR()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxQ()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxP()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::GreylistMaxO()), true);
- ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blacklist()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true);
+ ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true);
}
TEST_F(HiddenApiTest, CheckTestApiEnforcement) {
@@ -210,41 +210,41 @@
runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
runtime_->SetTargetSdkVersion(
- static_cast<uint32_t>(hiddenapi::ApiList::GreylistMaxR().GetMaxAllowedSdkVersion()) + 1);
+ static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetR().GetMaxAllowedSdkVersion()) + 1);
// Default case where all TestApis are treated like non-TestApi.
runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Whitelist()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Greylist()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::GreylistMaxR()), true);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), true);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::GreylistMaxQ()), true);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), true);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::GreylistMaxP()), true);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), true);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::GreylistMaxO()), true);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), true);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blacklist()), true);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), true);
// A case where we want to allow access to TestApis.
runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kDisabled);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Whitelist()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Greylist()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::GreylistMaxR()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), false);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::GreylistMaxQ()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), false);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::GreylistMaxP()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), false);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::GreylistMaxO()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), false);
ASSERT_EQ(
- ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blacklist()), false);
+ ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), false);
}
TEST_F(HiddenApiTest, CheckMembersRead) {
diff --git a/test/674-hiddenapi/hiddenapi.cc b/test/674-hiddenapi/hiddenapi.cc
index 132df74..6113e97 100644
--- a/test/674-hiddenapi/hiddenapi.cc
+++ b/test/674-hiddenapi/hiddenapi.cc
@@ -37,7 +37,7 @@
runtime->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
runtime->SetCorePlatformApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled);
runtime->SetTargetSdkVersion(
- static_cast<uint32_t>(hiddenapi::ApiList::GreylistMaxO().GetMaxAllowedSdkVersion()));
+ static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion()));
runtime->SetDedupeHiddenApiWarnings(false);
}
@@ -85,7 +85,7 @@
return int_index;
}
-extern "C" JNIEXPORT void JNICALL Java_Main_setWhitelistAll(JNIEnv*, jclass, jboolean value) {
+extern "C" JNIEXPORT void JNICALL Java_Main_setSdkAll(JNIEnv*, jclass, jboolean value) {
std::vector<std::string> exemptions;
if (value != JNI_FALSE) {
exemptions.push_back("L");
diff --git a/test/674-hiddenapi/src-art/Main.java b/test/674-hiddenapi/src-art/Main.java
index c92d352..13c4e81 100644
--- a/test/674-hiddenapi/src-art/Main.java
+++ b/test/674-hiddenapi/src-art/Main.java
@@ -89,7 +89,7 @@
}
private static void doTest(DexDomain parentDomain, DexDomain childDomain,
- boolean whitelistAllApis) throws Exception {
+ boolean addAllApisToSdk) throws Exception {
// Load parent dex if it is not in boot class path.
ClassLoader parentLoader = null;
if (parentDomain == DexDomain.Application) {
@@ -114,17 +114,17 @@
// be loaded once, but for some reason even classes from a class loader
// cannot register their native methods against symbols in a shared library
// loaded by their parent class loader.
- String nativeLibCopy = createNativeLibCopy(parentDomain, childDomain, whitelistAllApis);
+ String nativeLibCopy = createNativeLibCopy(parentDomain, childDomain, addAllApisToSdk);
- // Set exemptions to "L" (matches all classes) if we are testing whitelisting.
- setWhitelistAll(whitelistAllApis);
+ // Set exemptions to "L" (matches all classes) if we are testing sdk APIs.
+ setSdkAll(addAllApisToSdk);
// Invoke ChildClass.runTest
Class<?> childClass = Class.forName("ChildClass", true, childLoader);
Method runTestMethod = childClass.getDeclaredMethod(
"runTest", String.class, Integer.TYPE, Integer.TYPE, Boolean.TYPE);
runTestMethod.invoke(null, nativeLibCopy, parentDomain.ordinal(), childDomain.ordinal(),
- whitelistAllApis);
+ addAllApisToSdk);
}
// Routine which tries to figure out the absolute path of our native library.
@@ -150,10 +150,10 @@
// Copy native library to a new file with a unique name so it does not
// conflict with other loaded instance of the same binary file.
private static String createNativeLibCopy(DexDomain parentDomain, DexDomain childDomain,
- boolean whitelistAllApis) throws Exception {
+ boolean addAllApisToSdk) throws Exception {
String tempFileName = System.mapLibraryName(
"hiddenapitest_" + (parentDomain.ordinal()) + (childDomain.ordinal()) +
- (whitelistAllApis ? "1" : "0"));
+ (addAllApisToSdk ? "1" : "0"));
File tempFile = new File(System.getenv("DEX_LOCATION"), tempFileName);
Files.copy(new File(nativeLibFileName).toPath(), tempFile.toPath());
return tempFile.getAbsolutePath();
@@ -181,5 +181,5 @@
private static native int appendToBootClassLoader(String dexPath, boolean isCorePlatform);
private static native void setDexDomain(int index, boolean isCorePlatform);
private static native void init();
- private static native void setWhitelistAll(boolean value);
+ private static native void setSdkAll(boolean value);
}
diff --git a/tools/hiddenapi/README.md b/tools/hiddenapi/README.md
index cad1212..17cb95f 100644
--- a/tools/hiddenapi/README.md
+++ b/tools/hiddenapi/README.md
@@ -2,17 +2,17 @@
=========
This tool iterates over all class members inside given DEX files and modifies
-their access flags if their signatures appear on one of two lists - greylist and
-blacklist - provided as text file inputs. These access flags denote to the
+their access flags if their signatures appear on one of two lists - unsupported and
+blocklist - provided as text file inputs. These access flags denote to the
runtime that the marked methods/fields should be treated as internal APIs with
access restricted only to platform code. Methods/fields not mentioned on the two
-lists are assumed to be on a whitelist and left accessible by all code.
+lists are assumed to be part of the SDK and left accessible by all code.
API signatures
==============
-The methods/fields to be marked are specified in two text files (greylist,
-blacklist) provided an input. Only one signature per line is allowed.
+The methods/fields to be marked are specified in two text files (unsupported,
+blocklist) provided an input. Only one signature per line is allowed.
Types are expected in their DEX format - class descriptors are to be provided in
"slash" form, e.g. "Ljava/lang/Object;", primitive types in their shorty form,
@@ -49,6 +49,6 @@
Two following bit encoding is used to denote the membership of a method/field:
- * whitelist: `false`, `false`
- * greylist: `true`, `false`
- * blacklist: `true`, `true`
+ * sdk: `false`, `false`
+ * unsupported: `true`, `false`
+ * blocklist: `true`, `true`
diff --git a/tools/hiddenapi/hiddenapi.cc b/tools/hiddenapi/hiddenapi.cc
index 365dd43..5dbbaee 100644
--- a/tools/hiddenapi/hiddenapi.cc
+++ b/tools/hiddenapi/hiddenapi.cc
@@ -969,7 +969,7 @@
bool api_list_found = (it != api_list.end());
CHECK(!force_assign_all_ || api_list_found)
<< "Could not find hiddenapi flags for dex entry: " << boot_member.GetApiEntry();
- builder.WriteFlags(api_list_found ? it->second : ApiList::Whitelist());
+ builder.WriteFlags(api_list_found ? it->second : ApiList::Sdk());
};
auto fn_field = [&](const ClassAccessor::Field& boot_field) {
fn_shared(DexMember(boot_class, boot_field));
diff --git a/tools/hiddenapi/hiddenapi_test.cc b/tools/hiddenapi/hiddenapi_test.cc
index 41eb4db..06294a1 100644
--- a/tools/hiddenapi/hiddenapi_test.cc
+++ b/tools/hiddenapi/hiddenapi_test.cc
@@ -179,7 +179,7 @@
CHECK(accessor.HasClassData()) << "Class " << accessor.GetDescriptor() << " has no data";
if (!accessor.HasHiddenapiClassData()) {
- return hiddenapi::ApiList::Whitelist();
+ return hiddenapi::ApiList::Sdk();
}
for (const ClassAccessor::Field& field : accessor.GetFields()) {
@@ -206,7 +206,7 @@
CHECK(accessor.HasClassData()) << "Class " << accessor.GetDescriptor() << " has no data";
if (!accessor.HasHiddenapiClassData()) {
- return hiddenapi::ApiList::Whitelist();
+ return hiddenapi::ApiList::Sdk();
}
for (const ClassAccessor::Method& method : accessor.GetMethods()) {
@@ -272,7 +272,7 @@
<< "LMain;->ifield:LBadType3;,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetIFieldHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Sdk(), GetIFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceFieldLightGreylistMatch) {
@@ -283,7 +283,7 @@
<< "LMain;->ifield:LBadType3;,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetIFieldHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Unsupported(), GetIFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceFieldDarkGreylistMatch) {
@@ -294,7 +294,7 @@
<< "LMain;->ifield:LBadType3;,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetIFieldHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::MaxTargetO(), GetIFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceFieldBlacklistMatch) {
@@ -305,7 +305,7 @@
<< "LMain;->ifield:I,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetIFieldHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Blocked(), GetIFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceFieldTwoListsMatch1) {
@@ -343,7 +343,7 @@
<< "LMain;->sfield:LBadType3;,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetSFieldHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Sdk(), GetSFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticFieldLightGreylistMatch) {
@@ -354,7 +354,7 @@
<< "LMain;->sfield:LBadType3;,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetSFieldHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Unsupported(), GetSFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticFieldDarkGreylistMatch) {
@@ -365,7 +365,7 @@
<< "LMain;->sfield:LBadType3;,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetSFieldHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::MaxTargetO(), GetSFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticFieldBlacklistMatch) {
@@ -376,7 +376,7 @@
<< "LMain;->sfield:Ljava/lang/Object;,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetSFieldHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Blocked(), GetSFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticFieldTwoListsMatch1) {
@@ -414,7 +414,7 @@
<< "LMain;->imethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetIMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Sdk(), GetIMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceMethodLightGreylistMatch) {
@@ -425,7 +425,7 @@
<< "LMain;->imethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetIMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Unsupported(), GetIMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceMethodDarkGreylistMatch) {
@@ -436,7 +436,7 @@
<< "LMain;->imethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetIMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::MaxTargetO(), GetIMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceMethodBlacklistMatch) {
@@ -447,7 +447,7 @@
<< "LMain;->imethod(J)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetIMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Blocked(), GetIMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceMethodTwoListsMatch1) {
@@ -485,7 +485,7 @@
<< "LMain;->smethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetSMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Sdk(), GetSMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticMethodLightGreylistMatch) {
@@ -496,7 +496,7 @@
<< "LMain;->smethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetSMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Unsupported(), GetSMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticMethodDarkGreylistMatch) {
@@ -507,7 +507,7 @@
<< "LMain;->smethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetSMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::MaxTargetO(), GetSMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticMethodBlacklistMatch) {
@@ -518,7 +518,7 @@
<< "LMain;->smethod(Ljava/lang/Object;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetSMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Blocked(), GetSMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticMethodTwoListsMatch1) {
@@ -556,7 +556,7 @@
<< "LMain;->inmethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetINMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Sdk(), GetINMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceNativeMethodLightGreylistMatch) {
@@ -567,7 +567,7 @@
<< "LMain;->inmethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetINMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Unsupported(), GetINMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceNativeMethodDarkGreylistMatch) {
@@ -578,7 +578,7 @@
<< "LMain;->inmethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetINMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::MaxTargetO(), GetINMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceNativeMethodBlacklistMatch) {
@@ -589,7 +589,7 @@
<< "LMain;->inmethod(C)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetINMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Blocked(), GetINMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceNativeMethodTwoListsMatch1) {
@@ -627,7 +627,7 @@
<< "LMain;->snmethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetSNMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Sdk(), GetSNMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticNativeMethodLightGreylistMatch) {
@@ -638,7 +638,7 @@
<< "LMain;->snmethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetSNMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Unsupported(), GetSNMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticNativeMethodDarkGreylistMatch) {
@@ -649,7 +649,7 @@
<< "LMain;->snmethod(LBadType3;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetSNMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::MaxTargetO(), GetSNMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticNativeMethodBlacklistMatch) {
@@ -660,7 +660,7 @@
<< "LMain;->snmethod(Ljava/lang/Integer;)V,blacklist" << std::endl;
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
- ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetSNMethodHiddenFlags(*dex_file));
+ ASSERT_EQ(hiddenapi::ApiList::Blocked(), GetSNMethodHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, StaticNativeMethodTwoListsMatch1) {
@@ -699,7 +699,7 @@
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
ASSERT_EQ(hiddenapi::ApiList::CorePlatformApi() |
- hiddenapi::ApiList::Greylist(), GetIFieldHiddenFlags(*dex_file));
+ hiddenapi::ApiList::Unsupported(), GetIFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceFieldTestApiMatch) {
@@ -711,7 +711,7 @@
auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex);
ASSERT_NE(dex_file.get(), nullptr);
ASSERT_EQ(hiddenapi::ApiList::TestApi()
- | hiddenapi::ApiList::Greylist(), GetIFieldHiddenFlags(*dex_file));
+ | hiddenapi::ApiList::Unsupported(), GetIFieldHiddenFlags(*dex_file));
}
TEST_F(HiddenApiTest, InstanceFieldUnknownFlagMatch) {