Remove fallback to classes jars from bootclasspath_fragment
Previously, the hidden API processing performed by the platform_bootclasspath would try and get flag files from the fragments it references but would fall back to the classes jars. This change removes that logic as it is no longer needed as all fragments, both source and prebuilts, provide flag files and the prebuilts no longer provide valid classes jars. Bug: 194063708 Test: m out/soong/hiddenapi/hiddenapi-flags.csv - check that this does not change the contents. Change-Id: Ib867a08508f5a0f8858f6baedebbe99b6a825f80
This commit is contained in:
@@ -58,30 +58,20 @@ func newMonolithicHiddenAPIInfo(ctx android.ModuleContext, flagFilesByCategory F
|
||||
// Merge all the information from the classpathElements. The fragments form a DAG so it is possible that
|
||||
// this will introduce duplicates so they will be resolved after processing all the classpathElements.
|
||||
for _, element := range classpathElements {
|
||||
var classesJars android.Paths
|
||||
switch e := element.(type) {
|
||||
case *ClasspathLibraryElement:
|
||||
classesJars = retrieveClassesJarsFromModule(e.Module())
|
||||
classesJars := retrieveClassesJarsFromModule(e.Module())
|
||||
monolithicInfo.ClassesJars = append(monolithicInfo.ClassesJars, classesJars...)
|
||||
|
||||
case *ClasspathFragmentElement:
|
||||
fragment := e.Module()
|
||||
if ctx.OtherModuleHasProvider(fragment, HiddenAPIInfoProvider) {
|
||||
info := ctx.OtherModuleProvider(fragment, HiddenAPIInfoProvider).(HiddenAPIInfo)
|
||||
monolithicInfo.append(&info)
|
||||
|
||||
// If the bootclasspath fragment actually perform hidden API processing itself then use the
|
||||
// CSV files it provides and do not bother processing the classesJars files. This ensures
|
||||
// consistent behavior between source and prebuilt as prebuilt modules do not provide
|
||||
// classesJars.
|
||||
if info.AllFlagsPath != nil {
|
||||
continue
|
||||
}
|
||||
} else {
|
||||
ctx.ModuleErrorf("%s does not provide hidden API information", fragment)
|
||||
}
|
||||
|
||||
classesJars = extractClassesJarsFromModules(e.Contents)
|
||||
}
|
||||
|
||||
monolithicInfo.ClassesJars = append(monolithicInfo.ClassesJars, classesJars...)
|
||||
}
|
||||
|
||||
// Dedup paths.
|
||||
|
Reference in New Issue
Block a user