summaryrefslogtreecommitdiff
path: root/libartbase/base/hiddenapi_flags.h
diff options
context:
space:
mode:
Diffstat (limited to 'libartbase/base/hiddenapi_flags.h')
-rw-r--r--libartbase/base/hiddenapi_flags.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libartbase/base/hiddenapi_flags.h b/libartbase/base/hiddenapi_flags.h
index cd0bc7578c..a9a903b71f 100644
--- a/libartbase/base/hiddenapi_flags.h
+++ b/libartbase/base/hiddenapi_flags.h
@@ -290,6 +290,16 @@ class ApiList {
// 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 a test API.
+ bool IsTestApi() const {
+ return helper::MatchesBitMask(helper::ToBit(DomainApi::kTestApi), dex_flags_);
+ }
+
// Returns the maximum target SDK version allowed to access this ApiList.
SdkVersion GetMaxAllowedSdkVersion() const { return kMaxSdkVersions[GetIntValue()]; }