APEX can use any Prebuilt libraries
Vendor snapshot libraries generated from prebuilt libraries set
"apex_inherit" to their min_sdk_version property to allow them to be
used by vendor APEXes.
Bug: 277403349
Test: m vendor-snapshot
Change-Id: Idd9e5f8e94b3fa2adf47a04507bf0c50c59edfb7
diff --git a/cc/vendor_snapshot.go b/cc/vendor_snapshot.go
index 51f23c5..d2531c0 100644
--- a/cc/vendor_snapshot.go
+++ b/cc/vendor_snapshot.go
@@ -250,7 +250,11 @@
for _, path := range m.VintfFragments() {
prop.VintfFragments = append(prop.VintfFragments, filepath.Join("configs", path.Base()))
}
- prop.MinSdkVersion = m.MinSdkVersion()
+ if m.IsPrebuilt() {
+ prop.MinSdkVersion = "apex_inherit"
+ } else {
+ prop.MinSdkVersion = m.MinSdkVersion()
+ }
// install config files. ignores any duplicates.
for _, path := range append(m.InitRc(), m.VintfFragments()...) {