diff options
author | 2025-02-18 22:26:18 +0000 | |
---|---|---|
committer | 2025-02-19 09:35:36 -0800 | |
commit | 11bd0da6cfa3fa40bc61deae0ad1e6ba230b0954 (patch) | |
tree | 0f267c513190c11c31f02fee7e75f6b518a2f70c /runtime/mirror/class.cc | |
parent | c154e7f57173e1afbe8159d0ec30c3be3f67e588 (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.cc | 3 |
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. |