Simplify aconfig_declarations_group

Some of the getters were unused, which means that all the fields
could be made into local variables.

Test: m nothing --no-skip-soong-tests
Change-Id: Iea38ed7f9da952803f54194c0c5a8fda9b6007f5
This commit is contained in:
Cole Faust
2024-06-14 11:14:33 -07:00
parent 7467410787
commit 779d41cf7c
2 changed files with 22 additions and 41 deletions

View File

@@ -15,8 +15,6 @@
package codegen
import (
"fmt"
"android/soong/android"
"android/soong/java"
@@ -80,7 +78,7 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuild
// Get the values that came from the global RELEASE_ACONFIG_VALUE_SETS flag
declarationsModules := ctx.GetDirectDepsWithTag(declarationsTag)
if len(declarationsModules) != 1 {
panic(fmt.Errorf("Exactly one aconfig_declarations property required"))
panic("Exactly one aconfig_declarations property required")
}
declarations, _ := android.OtherModuleProvider(ctx, declarationsModules[0], android.AconfigDeclarationsProviderKey)
@@ -133,10 +131,6 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuild
return srcJarPath, declarations.IntermediateCacheOutputPath
}
func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) AconfigDeclarations() *string {
return proptools.StringPtr(callbacks.properties.Aconfig_declarations)
}
func isModeSupported(mode string) bool {
return android.InList(mode, aconfigSupportedModes)
}