Fix board_api_level comments and implementation
We accidentally ignored board_api_level property on aosp/3252595. Fix
it.
Also this cleans up the unnecessary default module
se_policy_conf_public_flags_defaults.
Bug: 358516352
Test: TH
Change-Id: I786cae0b12d2629d26ce4335866df364c218b6d0
diff --git a/build/soong/policy.go b/build/soong/policy.go
index 29685ea..d490845 100644
--- a/build/soong/policy.go
+++ b/build/soong/policy.go
@@ -91,8 +91,8 @@
// Desired number of MLS categories. Defaults to 1024
Mls_cats *int64
- // Board api level of policy files. Set "vendor" for RELEASE_BOARD_API_LEVEL, "system" for
- // turning off the guard, or a direct version string (e.g. "202404"). Defaults to "system"
+ // Board api level of policy files. Set "current" for RELEASE_BOARD_API_LEVEL, or a direct
+ // version string (e.g. "202404"). Defaults to "current"
Board_api_level *string
}
@@ -225,7 +225,12 @@
}
func (c *policyConf) boardApiLevel(ctx android.ModuleContext) string {
- return ctx.Config().VendorApiLevel()
+ level := proptools.StringDefault(c.properties.Board_api_level, "current")
+ if level == "current" {
+ return ctx.Config().VendorApiLevel()
+ } else {
+ return level
+ }
}
func findPolicyConfOrder(name string) int {