Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b58fdb0 authored by Paul Duffin's avatar Paul Duffin
Browse files

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
parent 8bb9c6a1
Loading
Loading
Loading
Loading
+1 −21
Original line number Diff line number Diff line
@@ -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})
		}
	} 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())
+0 −3
Original line number Diff line number Diff line
@@ -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