apex_vndk doen't need stub variants

This was revealed by the new check added in
Ib3c6efd16bdf13b59f79be66d4f9dba49100f6cc.

This was okay since the old implementation relied on the fact that impl
variant comes before stub variants.

To make the new check happy and keep the intention explicit, stub
variants are not added to VNDK apex.

Bug: 191770320
Test: m (apex_test)
Change-Id: I455f2c9b6bc471c579379286c0198f36d325adf6
This commit is contained in:
Jooyung Han
2022-12-21 10:17:44 +09:00
parent 862c0d68ff
commit 1724d58a91
2 changed files with 42 additions and 11 deletions

View File

@@ -368,7 +368,10 @@ func IsForVndkApex(mctx android.BottomUpMutatorContext, m *Module) bool {
}
return m.ImageVariation().Variation == android.CoreVariation && lib.shared() && m.IsVndkSp() && !m.IsVndkExt()
}
// VNDK APEX doesn't need stub variants
if lib.buildStubs() {
return false
}
useCoreVariant := m.VndkVersion() == mctx.DeviceConfig().PlatformVndkVersion() &&
mctx.DeviceConfig().VndkUseCoreVariant() && !m.MustUseVendorVariant()
return lib.shared() && m.InVendor() && m.IsVndk() && !m.IsVndkExt() && !useCoreVariant