API flagging macro until/starting_at for private and public
- Applies the starting_at_board_api macro also to private types
- Add a macro complementary to the starting_at_board_api macro to write rules if
the the board api level is lower than the specified api
Test: build on trunk_staging (board api 202504) and next (board api202404)
Bug: 356832676
Bug: 358516352
Change-Id: I2427e0d9ab6ac72e5f137dcd37705a9b38637205
diff --git a/build/soong/policy.go b/build/soong/policy.go
index 4476f94..29685ea 100644
--- a/build/soong/policy.go
+++ b/build/soong/policy.go
@@ -225,17 +225,7 @@
}
func (c *policyConf) boardApiLevel(ctx android.ModuleContext) string {
- level := proptools.StringDefault(c.properties.Board_api_level, "system")
-
- if level == "system" {
- // aribtrary value greater than any other vendor API levels
- return "1000000"
- } else if level == "vendor" {
- return ctx.Config().VendorApiLevel()
- } else {
- return level
- }
-
+ return ctx.Config().VendorApiLevel()
}
func findPolicyConfOrder(name string) int {