Convert checkApexAvailability to use ModuleProxy.
Bug: 377723687
Test: Unit tests and compare the ninja and mk files generated.
Change-Id: I7582db8e22e94d0a9db7715a76bb6ed34c166a4e
diff --git a/cc/library.go b/cc/library.go
index 6485ea3..ebc65ef 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -723,7 +723,7 @@
// Write LOCAL_ADDITIONAL_DEPENDENCIES for ABI diff
androidMkWriteAdditionalDependenciesForSourceAbiDiff(w io.Writer)
- availableFor(string) bool
+ apexAvailable() []string
getAPIListCoverageXMLPath() android.ModuleOutPath
@@ -1959,17 +1959,15 @@
return library.MutatedProperties.IsLatestVersion
}
-func (library *libraryDecorator) availableFor(what string) bool {
+func (library *libraryDecorator) apexAvailable() []string {
var list []string
if library.static() {
list = library.StaticProperties.Static.Apex_available
} else if library.shared() {
list = library.SharedProperties.Shared.Apex_available
}
- if len(list) == 0 {
- return false
- }
- return android.CheckAvailableForApex(what, list)
+
+ return list
}
func (library *libraryDecorator) installable() *bool {