Merge "Clean up LLNDK stubs" into main
This commit is contained in:
@@ -1915,12 +1915,15 @@ func (library *libraryDecorator) stubsVersions(ctx android.BaseMutatorContext) [
|
||||
}
|
||||
|
||||
if library.hasLLNDKStubs() && ctx.Module().(*Module).InVendorOrProduct() {
|
||||
// LLNDK libraries only need a single stubs variant.
|
||||
return []string{android.FutureApiLevel.String()}
|
||||
// LLNDK libraries only need a single stubs variant (""), which is
|
||||
// added automatically in createVersionVariations().
|
||||
return nil
|
||||
}
|
||||
|
||||
// Future API level is implicitly added if there isn't
|
||||
return addCurrentVersionIfNotPresent(library.Properties.Stubs.Versions)
|
||||
versions := addCurrentVersionIfNotPresent(library.Properties.Stubs.Versions)
|
||||
normalizeVersions(ctx, versions)
|
||||
return versions
|
||||
}
|
||||
|
||||
func addCurrentVersionIfNotPresent(vers []string) []string {
|
||||
@@ -2292,10 +2295,6 @@ func setStubsVersions(mctx android.BottomUpMutatorContext, library libraryInterf
|
||||
return
|
||||
}
|
||||
versions := library.stubsVersions(mctx)
|
||||
if len(versions) <= 0 {
|
||||
return
|
||||
}
|
||||
normalizeVersions(mctx, versions)
|
||||
if mctx.Failed() {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user