Fix logic around SDK visibility of interface methods.
- FindIncompatibleMethod needs to look for an accessible interface SDK method
instead of all interface methods.
- We need to check which API list a method belongs to in FindAccessibleInterfaceMethod
as the public API bit in the access flags can be updated for
optimizations.
Test: 817-hiddenapi
Bug: 218589191
Change-Id: I274b234657c6dc3fe61278924774896488d4c708
diff --git a/libartbase/base/hiddenapi_flags.h b/libartbase/base/hiddenapi_flags.h
index 64d3fae..aef4a73 100644
--- a/libartbase/base/hiddenapi_flags.h
+++ b/libartbase/base/hiddenapi_flags.h
@@ -326,6 +326,10 @@
return GetValue() == Value::kBlocked;
}
+ bool IsSdkApi() const {
+ return GetValue() == Value::kSdk;
+ }
+
// Returns true if the ApiList is a test API.
bool IsTestApi() const {
return helper::MatchesBitMask(helper::ToBit(DomainApi::kTestApi), dex_flags_);