Revert "Revert "Enforce min_sdk_version of apex(use_vendor:true)""
This reverts commit bacf34d986011a37dc45ebbd59d464950cd7574d.
Reason for revert: reland with fix
Change-Id: Ia03f2808353f5640597ae7ecbf2e06fc903c6977
diff --git a/cc/vndk.go b/cc/vndk.go
index e02e7b5..4888dcf 100644
--- a/cc/vndk.go
+++ b/cc/vndk.go
@@ -297,6 +297,9 @@
if !Bool(lib.Properties.Vendor_available) {
vndkPrivateLibraries(mctx.Config())[name] = filename
}
+ if mctx.OtherModuleExists(name) {
+ mctx.AddFarVariationDependencies(m.Target().Variations(), llndkImplDep, name)
+ }
}
func processVndkLibrary(mctx android.BottomUpMutatorContext, m *Module) {