diff options
| -rw-r--r-- | runtime/hidden_api.cc | 10 | ||||
| -rw-r--r-- | runtime/hidden_api.h | 7 |
2 files changed, 12 insertions, 5 deletions
diff --git a/runtime/hidden_api.cc b/runtime/hidden_api.cc index 612a930fab..bc6a8f28de 100644 --- a/runtime/hidden_api.cc +++ b/runtime/hidden_api.cc @@ -172,7 +172,10 @@ void MemberSignature::LogAccessToEventLog(AccessMethod access_method, Action act } template<typename T> -Action GetMemberActionImpl(T* member, Action action, AccessMethod access_method) { +Action GetMemberActionImpl(T* member, + HiddenApiAccessFlags::ApiList api_list, + Action action, + AccessMethod access_method) { DCHECK_NE(action, kAllow); // Get the signature, we need it later. @@ -202,8 +205,7 @@ Action GetMemberActionImpl(T* member, Action action, AccessMethod access_method) if (access_method != kNone) { // Print a log message with information about this class member access. // We do this if we're about to block access, or the app is debuggable. - member_signature.WarnAboutAccess(access_method, - HiddenApiAccessFlags::DecodeFromRuntime(member->GetAccessFlags())); + member_signature.WarnAboutAccess(access_method, api_list); } } @@ -244,9 +246,11 @@ Action GetMemberActionImpl(T* member, Action action, AccessMethod access_method) // Need to instantiate this. template Action GetMemberActionImpl<ArtField>(ArtField* member, + HiddenApiAccessFlags::ApiList api_list, Action action, AccessMethod access_method); template Action GetMemberActionImpl<ArtMethod>(ArtMethod* member, + HiddenApiAccessFlags::ApiList api_list, Action action, AccessMethod access_method); } // namespace detail diff --git a/runtime/hidden_api.h b/runtime/hidden_api.h index 5762bfefc1..65c6406393 100644 --- a/runtime/hidden_api.h +++ b/runtime/hidden_api.h @@ -134,7 +134,10 @@ class MemberSignature { }; template<typename T> -Action GetMemberActionImpl(T* member, Action action, AccessMethod access_method) +Action GetMemberActionImpl(T* member, + HiddenApiAccessFlags::ApiList api_list, + Action action, + AccessMethod access_method) REQUIRES_SHARED(Locks::mutator_lock_); // Returns true if the caller is either loaded by the boot strap class loader or comes from @@ -191,7 +194,7 @@ inline Action GetMemberAction(T* member, } // Member is hidden and caller is not in the platform. - return detail::GetMemberActionImpl(member, action, access_method); + return detail::GetMemberActionImpl(member, api_list, action, access_method); } inline bool IsCallerInPlatformDex(ObjPtr<mirror::Class> caller) |