diff options
| author | 2018-10-31 11:04:10 +0000 | |
|---|---|---|
| committer | 2018-11-22 12:49:26 +0000 | |
| commit | dcfa89bfc06a6c211bbb64fa81313eaf6454ab67 (patch) | |
| tree | 4aaf6da88861029e387525957bf68796cf95648c /runtime/hidden_api.h | |
| parent | fd667d4165aefe51010e4fe3bd81b820ed9884ef (diff) | |
Rename and reorganize hiddenapi::ApiList
Change values of ApiList flags to make them easier to extend in the
future and unify naming across all components. Light greylist is now
just "Greylist", dark greylist becomes "GreylistMaxO".
Note that the version code in "GreylistMaxO" must also include any
maintenance releases, i.e. entries on "GreylistMaxO" are accessible
to apps with targetSdkVersion<=27 (O MR1).
Test: m, phone boots
Test: m test-art
Change-Id: I9622e0646eb265008a8bb2652270876ae95dac84
Diffstat (limited to 'runtime/hidden_api.h')
| -rw-r--r-- | runtime/hidden_api.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/hidden_api.h b/runtime/hidden_api.h index 32bae1127b..eea58e9880 100644 --- a/runtime/hidden_api.h +++ b/runtime/hidden_api.h @@ -19,8 +19,8 @@ #include "art_field.h" #include "art_method.h" +#include "base/hiddenapi_flags.h" #include "base/mutex.h" -#include "dex/hidden_api_access_flags.h" #include "intrinsics_enum.h" #include "mirror/class-inl.h" #include "reflection.h" @@ -177,10 +177,10 @@ ALWAYS_INLINE inline uint32_t CreateRuntimeFlags(const ClassAccessor::BaseItem& uint32_t runtime_flags = 0u; uint32_t dex_flags = member.GetHiddenapiFlags(); - DCHECK(AreValidFlags(dex_flags)); + DCHECK(AreValidDexFlags(dex_flags)); - ApiList api_list = static_cast<hiddenapi::ApiList>(dex_flags); - if (api_list == ApiList::kWhitelist) { + ApiList api_list = ApiList::FromDexFlags(dex_flags); + if (api_list == ApiList::Whitelist()) { runtime_flags |= kAccPublicApi; } @@ -316,7 +316,7 @@ inline bool ShouldDenyAccessToMember(T* member, // Decode hidden API access flags from the dex file. // This is an O(N) operation scaling with the number of fields/methods // in the class. Only do this on slow path and only do it once. - ApiList api_list = static_cast<hiddenapi::ApiList>(detail::GetDexFlags(member)); + ApiList api_list = ApiList::FromDexFlags(detail::GetDexFlags(member)); // Member is hidden and caller is not exempted. Enter slow path. return detail::ShouldDenyAccessToMemberImpl(member, api_list, access_method); |