Merge "Rename propertyAccessor to propertyValueReader" am: 9a26f8cf2a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682432 Change-Id: Ia3c13c9a473d76729d978913200deb3be168f2a8
This commit is contained in:
@@ -64,7 +64,7 @@ type HiddenAPIFlagFileProperties struct {
|
|||||||
func (p *HiddenAPIFlagFileProperties) hiddenAPIFlagFileInfo(ctx android.ModuleContext) hiddenAPIFlagFileInfo {
|
func (p *HiddenAPIFlagFileProperties) hiddenAPIFlagFileInfo(ctx android.ModuleContext) hiddenAPIFlagFileInfo {
|
||||||
info := hiddenAPIFlagFileInfo{categoryToPaths: map[*hiddenAPIFlagFileCategory]android.Paths{}}
|
info := hiddenAPIFlagFileInfo{categoryToPaths: map[*hiddenAPIFlagFileCategory]android.Paths{}}
|
||||||
for _, category := range hiddenAPIFlagFileCategories {
|
for _, category := range hiddenAPIFlagFileCategories {
|
||||||
paths := android.PathsForModuleSrc(ctx, category.propertyAccessor(p))
|
paths := android.PathsForModuleSrc(ctx, category.propertyValueReader(p))
|
||||||
info.categoryToPaths[category] = paths
|
info.categoryToPaths[category] = paths
|
||||||
}
|
}
|
||||||
return info
|
return info
|
||||||
@@ -74,9 +74,9 @@ type hiddenAPIFlagFileCategory struct {
|
|||||||
// propertyName is the name of the property for this category.
|
// propertyName is the name of the property for this category.
|
||||||
propertyName string
|
propertyName string
|
||||||
|
|
||||||
// propertyAccessor retrieves the value of the property for this category from the set of
|
// propertyValueReader retrieves the value of the property for this category from the set of
|
||||||
// properties.
|
// properties.
|
||||||
propertyAccessor func(properties *HiddenAPIFlagFileProperties) []string
|
propertyValueReader func(properties *HiddenAPIFlagFileProperties) []string
|
||||||
|
|
||||||
// commandMutator adds the appropriate command line options for this category to the supplied
|
// commandMutator adds the appropriate command line options for this category to the supplied
|
||||||
// command
|
// command
|
||||||
@@ -87,7 +87,7 @@ var hiddenAPIFlagFileCategories = []*hiddenAPIFlagFileCategory{
|
|||||||
// See HiddenAPIFlagFileProperties.Unsupported
|
// See HiddenAPIFlagFileProperties.Unsupported
|
||||||
{
|
{
|
||||||
propertyName: "unsupported",
|
propertyName: "unsupported",
|
||||||
propertyAccessor: func(properties *HiddenAPIFlagFileProperties) []string {
|
propertyValueReader: func(properties *HiddenAPIFlagFileProperties) []string {
|
||||||
return properties.Unsupported
|
return properties.Unsupported
|
||||||
},
|
},
|
||||||
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
||||||
@@ -97,7 +97,7 @@ var hiddenAPIFlagFileCategories = []*hiddenAPIFlagFileCategory{
|
|||||||
// See HiddenAPIFlagFileProperties.Removed
|
// See HiddenAPIFlagFileProperties.Removed
|
||||||
{
|
{
|
||||||
propertyName: "removed",
|
propertyName: "removed",
|
||||||
propertyAccessor: func(properties *HiddenAPIFlagFileProperties) []string {
|
propertyValueReader: func(properties *HiddenAPIFlagFileProperties) []string {
|
||||||
return properties.Removed
|
return properties.Removed
|
||||||
},
|
},
|
||||||
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
||||||
@@ -107,7 +107,7 @@ var hiddenAPIFlagFileCategories = []*hiddenAPIFlagFileCategory{
|
|||||||
// See HiddenAPIFlagFileProperties.Max_target_r_low_priority
|
// See HiddenAPIFlagFileProperties.Max_target_r_low_priority
|
||||||
{
|
{
|
||||||
propertyName: "max_target_r_low_priority",
|
propertyName: "max_target_r_low_priority",
|
||||||
propertyAccessor: func(properties *HiddenAPIFlagFileProperties) []string {
|
propertyValueReader: func(properties *HiddenAPIFlagFileProperties) []string {
|
||||||
return properties.Max_target_r_low_priority
|
return properties.Max_target_r_low_priority
|
||||||
},
|
},
|
||||||
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
||||||
@@ -117,7 +117,7 @@ var hiddenAPIFlagFileCategories = []*hiddenAPIFlagFileCategory{
|
|||||||
// See HiddenAPIFlagFileProperties.Max_target_q
|
// See HiddenAPIFlagFileProperties.Max_target_q
|
||||||
{
|
{
|
||||||
propertyName: "max_target_q",
|
propertyName: "max_target_q",
|
||||||
propertyAccessor: func(properties *HiddenAPIFlagFileProperties) []string {
|
propertyValueReader: func(properties *HiddenAPIFlagFileProperties) []string {
|
||||||
return properties.Max_target_q
|
return properties.Max_target_q
|
||||||
},
|
},
|
||||||
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
||||||
@@ -127,7 +127,7 @@ var hiddenAPIFlagFileCategories = []*hiddenAPIFlagFileCategory{
|
|||||||
// See HiddenAPIFlagFileProperties.Max_target_p
|
// See HiddenAPIFlagFileProperties.Max_target_p
|
||||||
{
|
{
|
||||||
propertyName: "max_target_p",
|
propertyName: "max_target_p",
|
||||||
propertyAccessor: func(properties *HiddenAPIFlagFileProperties) []string {
|
propertyValueReader: func(properties *HiddenAPIFlagFileProperties) []string {
|
||||||
return properties.Max_target_p
|
return properties.Max_target_p
|
||||||
},
|
},
|
||||||
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
||||||
@@ -137,7 +137,7 @@ var hiddenAPIFlagFileCategories = []*hiddenAPIFlagFileCategory{
|
|||||||
// See HiddenAPIFlagFileProperties.Max_target_o_low_priority
|
// See HiddenAPIFlagFileProperties.Max_target_o_low_priority
|
||||||
{
|
{
|
||||||
propertyName: "max_target_o_low_priority",
|
propertyName: "max_target_o_low_priority",
|
||||||
propertyAccessor: func(properties *HiddenAPIFlagFileProperties) []string {
|
propertyValueReader: func(properties *HiddenAPIFlagFileProperties) []string {
|
||||||
return properties.Max_target_o_low_priority
|
return properties.Max_target_o_low_priority
|
||||||
},
|
},
|
||||||
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
||||||
@@ -147,7 +147,7 @@ var hiddenAPIFlagFileCategories = []*hiddenAPIFlagFileCategory{
|
|||||||
// See HiddenAPIFlagFileProperties.Blocked
|
// See HiddenAPIFlagFileProperties.Blocked
|
||||||
{
|
{
|
||||||
propertyName: "blocked",
|
propertyName: "blocked",
|
||||||
propertyAccessor: func(properties *HiddenAPIFlagFileProperties) []string {
|
propertyValueReader: func(properties *HiddenAPIFlagFileProperties) []string {
|
||||||
return properties.Blocked
|
return properties.Blocked
|
||||||
},
|
},
|
||||||
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
||||||
@@ -157,7 +157,7 @@ var hiddenAPIFlagFileCategories = []*hiddenAPIFlagFileCategory{
|
|||||||
// See HiddenAPIFlagFileProperties.Unsupported_packages
|
// See HiddenAPIFlagFileProperties.Unsupported_packages
|
||||||
{
|
{
|
||||||
propertyName: "unsupported_packages",
|
propertyName: "unsupported_packages",
|
||||||
propertyAccessor: func(properties *HiddenAPIFlagFileProperties) []string {
|
propertyValueReader: func(properties *HiddenAPIFlagFileProperties) []string {
|
||||||
return properties.Unsupported_packages
|
return properties.Unsupported_packages
|
||||||
},
|
},
|
||||||
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
commandMutator: func(command *android.RuleBuilderCommand, path android.Path) {
|
||||||
|
Reference in New Issue
Block a user