Move string list utility functions to android package

Test: m checkbuild
Change-Id: I50a7ccf9fd7ed82b688e3eb90489c0bc0af33287
This commit is contained in:
Colin Cross
2017-12-22 15:47:09 -08:00
parent ba5b43ee44
commit b4330e222b
4 changed files with 49 additions and 57 deletions

View File

@@ -690,12 +690,12 @@ func (c *deviceConfig) NativeCoverageEnabled() bool {
func (c *deviceConfig) CoverageEnabledForPath(path string) bool {
coverage := false
if c.config.ProductVariables.CoveragePaths != nil {
if prefixInList(path, *c.config.ProductVariables.CoveragePaths) {
if PrefixInList(path, *c.config.ProductVariables.CoveragePaths) {
coverage = true
}
}
if coverage && c.config.ProductVariables.CoverageExcludePaths != nil {
if prefixInList(path, *c.config.ProductVariables.CoverageExcludePaths) {
if PrefixInList(path, *c.config.ProductVariables.CoverageExcludePaths) {
coverage = false
}
}
@@ -706,21 +706,21 @@ func (c *config) IntegerOverflowDisabledForPath(path string) bool {
if c.ProductVariables.IntegerOverflowExcludePaths == nil {
return false
}
return prefixInList(path, *c.ProductVariables.IntegerOverflowExcludePaths)
return PrefixInList(path, *c.ProductVariables.IntegerOverflowExcludePaths)
}
func (c *config) CFIDisabledForPath(path string) bool {
if c.ProductVariables.CFIExcludePaths == nil {
return false
}
return prefixInList(path, *c.ProductVariables.CFIExcludePaths)
return PrefixInList(path, *c.ProductVariables.CFIExcludePaths)
}
func (c *config) CFIEnabledForPath(path string) bool {
if c.ProductVariables.CFIIncludePaths == nil {
return false
}
return prefixInList(path, *c.ProductVariables.CFIIncludePaths)
return PrefixInList(path, *c.ProductVariables.CFIIncludePaths)
}
func stringSlice(s *[]string) []string {