Merge "Revert "Don't add uses_libs/optional_uses_libs to the manifest_fixer.""

This commit is contained in:
Treehugger Robot
2022-05-04 15:19:37 +00:00
committed by Gerrit Code Review
10 changed files with 1651 additions and 120 deletions

View File

@@ -724,8 +724,10 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
if component, ok := dep.(SdkLibraryComponentDependency); ok {
if lib := component.OptionalSdkLibraryImplementation(); lib != nil {
// Add library as optional if it's one of the optional compatibility libs.
optional := android.InList(*lib, dexpreopt.OptionalCompatUsesLibs)
tag := makeUsesLibraryDependencyTag(dexpreopt.AnySdkVersion, optional, true)
tag := usesLibReqTag
if android.InList(*lib, dexpreopt.OptionalCompatUsesLibs) {
tag = usesLibOptTag
}
ctx.AddVariationDependencies(nil, tag, *lib)
}
}