Add com.google.pixel.camera.hal.manifest to build number allowlist

So that it can be removed from the genrule sandboxing allowlist.
Because this is an internal module, I'm submitting this allowlist
addition first, then will make the genrule use it, then will remove
it from the sandboxing allowlist.

Bug: 307824623
Test: Presubmits
Change-Id: Ia7001d89a57fd1d2fbe3b0f79fb68fecf859fbb4
This commit is contained in:
Cole Faust
2024-08-28 11:08:06 -07:00
parent b41b74fa2c
commit dc0187811f

View File

@@ -253,13 +253,21 @@ var buildNumberAllowlistKey = android.NewOnceKey("genruleBuildNumberAllowlistKey
// soong plugins cannot add entries to the allowlist
func isModuleInBuildNumberAllowlist(ctx android.ModuleContext) bool {
allowlist := ctx.Config().Once(buildNumberAllowlistKey, func() interface{} {
return map[string]bool{
// Define the allowlist as a list and then copy it into a map so that
// gofmt doesn't change unnecessary lines trying to align the values of the map.
allowlist := []string{
// go/keep-sorted start
"build/soong/tests:gen": true,
"hardware/google/camera/common/hal/aidl_service:aidl_camera_build_version": true,
"tools/tradefederation/core:tradefed_zip": true,
"build/soong/tests:gen",
"hardware/google/camera/common/hal/aidl_service:aidl_camera_build_version",
"tools/tradefederation/core:tradefed_zip",
"vendor/google/services/LyricCameraHAL/src/apex:com.google.pixel.camera.hal.manifest",
// go/keep-sorted end
}
allowlistMap := make(map[string]bool, len(allowlist))
for _, a := range allowlist {
allowlistMap[a] = true
}
return allowlistMap
}).(map[string]bool)
_, ok := allowlist[ctx.ModuleDir()+":"+ctx.ModuleName()]