summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Justin Yun <justinyun@google.com> 2024-10-24 09:20:48 +0900
committer Justin Yun <justinyun@google.com> 2024-10-24 14:45:47 +0900
commit3f84f6ea6f522efc23945598ad5bb71eecd59bc1 (patch)
treefcb8ac0791566bc65e11fdbda19e9f311eb16d71
parent44b35ecc43347292a95dec396244f083f77c9bdc (diff)
Define VendorApiLevelPropOverride for GRF prop
Soong must read BOARD_API_LEVEL_PROP_OVERRIDE to generate build props for vendor image. If this value is provided, ro.board.api_level will be set to this value. Bug: 374333106 Test: read product_config Change-Id: Ifbeea76596ea7b22928ae58467bb05cffeb5da1f
-rw-r--r--android/variable.go3
-rw-r--r--scripts/gen_build_prop.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/android/variable.go b/android/variable.go
index 34a3d3041..c35294200 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -241,7 +241,8 @@ type ProductVariables struct {
DeviceMaxPageSizeSupported *string `json:",omitempty"`
DeviceNoBionicPageSizeMacro *bool `json:",omitempty"`
- VendorApiLevel *string `json:",omitempty"`
+ VendorApiLevel *string `json:",omitempty"`
+ VendorApiLevelPropOverride *string `json:",omitempty"`
DeviceSecondaryArch *string `json:",omitempty"`
DeviceSecondaryArchVariant *string `json:",omitempty"`
diff --git a/scripts/gen_build_prop.py b/scripts/gen_build_prop.py
index c08a3fd42..df9e98d1e 100644
--- a/scripts/gen_build_prop.py
+++ b/scripts/gen_build_prop.py
@@ -429,7 +429,9 @@ def append_additional_vendor_props(args):
# Build system set BOARD_API_LEVEL to show the api level of the vendor API surface.
# This must not be altered outside of build system.
if config["VendorApiLevel"]:
- props.append(f"ro.board.api_level={config['VendorApiLevel']}")
+ props.append(f"ro.board.api_level?={config['VendorApiLevel']}")
+ if config["VendorApiLevelPropOverride"]:
+ props.append(f"ro.board.api_level={config['VendorApiLevelPropOverride']}")
# RELEASE_BOARD_API_LEVEL_FROZEN is true when the vendor API surface is frozen.
if build_flags["RELEASE_BOARD_API_LEVEL_FROZEN"]: