summaryrefslogtreecommitdiff
path: root/runtime/mirror/class.cc
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2025-02-18 22:26:18 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-02-19 09:35:36 -0800
commit11bd0da6cfa3fa40bc61deae0ad1e6ba230b0954 (patch)
tree0f267c513190c11c31f02fee7e75f6b518a2f70c /runtime/mirror/class.cc
parentc154e7f57173e1afbe8159d0ec30c3be3f67e588 (diff)
Readability fixes and some API cleanup in art::hiddenapi::ApiList.
- Describe the layout in dex_flags_ better and be more explicit about the differences between the Value and DomainApi parts. - Use factory functions instead of constructors with different types. - Hide several functions not used outside the class. - Add Value::kFuture for the de-facto Value for max-target-future. - Add static assertions for more invariants. - Note a strange behaviour in Combine() that is intentionally not addressed, to keep the refactoring pure. Test: atest art_standalone_runtime_tests art_hiddenapi_tests Test: m veridex Bug: 377676642 Change-Id: I52c1e45da94ffa6fb87e314fb423bb9994381465
Diffstat (limited to 'runtime/mirror/class.cc')
-rw-r--r--runtime/mirror/class.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc
index 7bc0826424..fe923cbaa6 100644
--- a/runtime/mirror/class.cc
+++ b/runtime/mirror/class.cc
@@ -2298,7 +2298,8 @@ static bool IsInterfaceMethodAccessible(ArtMethod* interface_method)
REQUIRES_SHARED(Locks::mutator_lock_) {
// If the interface method is part of the public SDK, return it.
if ((hiddenapi::GetRuntimeFlags(interface_method) & kAccPublicApi) != 0) {
- hiddenapi::ApiList api_list(hiddenapi::detail::GetDexFlags(interface_method));
+ hiddenapi::ApiList api_list =
+ hiddenapi::ApiList::FromDexFlags(hiddenapi::detail::GetDexFlags(interface_method));
// The kAccPublicApi flag is also used as an optimization to avoid
// other hiddenapi checks to always go on the slow path. Therefore, we
// need to check here if the method is in the SDK list.