Make //apex_available:platform the default.
go/Android.bp mentions that ["//apex_available:platform"] is the
default, but currently it was []. This change does not create any
additional module variants.
(Noticed this for libz, I was expecting its apex_available to be
platform and not an empty list)
Test: TH
Change-Id: I9af06f813b1a1d7b716939874f469bd2e1ce4d14
diff --git a/android/apex.go b/android/apex.go
index 87bff74..5bbc02e 100644
--- a/android/apex.go
+++ b/android/apex.go
@@ -356,9 +356,18 @@
return m
}
+var (
+ availableToPlatformList = []string{AvailableToPlatform}
+)
+
// Implements ApexModule
func (m *ApexModuleBase) ApexAvailable() []string {
- return m.ApexProperties.Apex_available
+ aa := m.ApexProperties.Apex_available
+ if len(aa) > 0 {
+ return aa
+ }
+ // Default is availability to platform
+ return CopyOf(availableToPlatformList)
}
// Implements ApexModule