Remove unnecessary additionalCheckedModules field

This change removes the field and the code that uses it which is
effectively dead code as it only does something when the list is not
empty and a previous change removed the only code that added a Path to
this list.

Bug: 201753898
Test: m nothing
Change-Id: I67c74ad2a3b115fd3b20b3b416f45b92c749749c
This commit is contained in:
Paul Duffin
2021-10-02 10:37:58 +01:00
parent 8bb9c6a1d9
commit 0b58fdb058
2 changed files with 1 additions and 24 deletions

View File

@@ -71,23 +71,7 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
entriesList = append(entriesList, android.AndroidMkEntries{Disabled: true})
} else if !library.ApexModuleBase.AvailableFor(android.AvailableToPlatform) {
// Platform variant. If not available for the platform, we don't need Make module.
// May still need to add some additional dependencies.
checkedModulePaths := library.additionalCheckedModules
if len(checkedModulePaths) != 0 {
entriesList = append(entriesList, android.AndroidMkEntries{
Class: "FAKE",
// Need at least one output file in order for this to take effect.
OutputFile: android.OptionalPathForPath(checkedModulePaths[0]),
Include: "$(BUILD_PHONY_PACKAGE)",
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
func(ctx android.AndroidMkExtraEntriesContext, entries *android.AndroidMkEntries) {
entries.AddStrings("LOCAL_ADDITIONAL_CHECKED_MODULE", checkedModulePaths.Strings()...)
},
},
})
} else {
entriesList = append(entriesList, android.AndroidMkEntries{Disabled: true})
}
entriesList = append(entriesList, android.AndroidMkEntries{Disabled: true})
} else {
entriesList = append(entriesList, android.AndroidMkEntries{
Class: "JAVA_LIBRARIES",
@@ -123,10 +107,6 @@ func (library *Library) AndroidMkEntries() []android.AndroidMkEntries {
requiredUsesLibs, optionalUsesLibs := library.classLoaderContexts.UsesLibs()
entries.AddStrings("LOCAL_EXPORT_SDK_LIBRARIES", append(requiredUsesLibs, optionalUsesLibs...)...)
if len(library.additionalCheckedModules) != 0 {
entries.AddStrings("LOCAL_ADDITIONAL_CHECKED_MODULE", library.additionalCheckedModules.Strings()...)
}
entries.SetOptionalPath("LOCAL_SOONG_PROGUARD_DICT", library.dexer.proguardDictionary)
entries.SetOptionalPath("LOCAL_SOONG_PROGUARD_USAGE_ZIP", library.dexer.proguardUsageZip)
entries.SetString("LOCAL_MODULE_STEM", library.Stem())

View File

@@ -433,9 +433,6 @@ type Module struct {
// expanded Jarjar_rules
expandJarjarRules android.Path
// list of additional targets for checkbuild
additionalCheckedModules android.Paths
// Extra files generated by the module type to be added as java resources.
extraResources android.Paths