Merge "Dedup checks for module being in versioned sdk snapshot"

This commit is contained in:
Paul Duffin
2023-01-06 22:37:15 +00:00
committed by Gerrit Code Review
3 changed files with 3 additions and 3 deletions

View File

@@ -3539,7 +3539,7 @@ func (c *Module) IsInstallableToApex() bool {
if lib := c.library; lib != nil {
// Stub libs and prebuilt libs in a versioned SDK are not
// installable to APEX even though they are shared libs.
return lib.shared() && !lib.buildStubs() && c.ContainingSdk().Unversioned()
return lib.shared() && !lib.buildStubs() && !android.IsModuleInVersionedSdk(c)
} else if _, ok := c.linker.(testPerSrc); ok {
return true
}

View File

@@ -211,7 +211,7 @@ func IsValidSharedDependency(dependency android.Module) bool {
// Discard versioned members of SDK snapshots, because they will conflict with
// unversioned ones.
if sdkMember, ok := dependency.(android.SdkAware); ok && !sdkMember.ContainingSdk().Unversioned() {
if android.IsModuleInVersionedSdk(dependency) {
return false
}