vendor API level current is 10,000,000

since it was a weird thing from the last
change, and 10,000 < 202404.

Bug: N/A
Test: selftest
Change-Id: I467a334b791faaeb1bab892c0e1a80c28a0b5d09
This commit is contained in:
Steven Moreland
2024-06-28 00:44:21 +00:00
parent eae45e70ca
commit fd54266000

View File

@@ -578,11 +578,26 @@ ifdef PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS
endif
# This table maps sdk version 35 to vendor api level 202404 and assumes yearly
# release for the same month.
# release for the same month. If 10000 API level or more is used, which usually
# represents 'current' or 'future' API levels, several zeros are added to
# preserve ordering. Specifically API level 10,000 is converted to 10,000,000
# which importantly is greater than 202404 = 202,404. This convention will break
# in 100,000 CE, which is the closest multiple of 10 that doesn't break earlier
# than 10,000 as an API level breaks.
define sdk-to-vendor-api-level
$(if $(call math_lt_or_eq,$(1),34),$(1),20$(call int_subtract,$(1),11)04)
$(if $(call math_lt_or_eq,$(1),34),$(1),$(if $(call math_lt,$(1),10000),20$(call int_subtract,$(1),11)04,$(1)000))
endef
ifneq ($(call sdk-to-vendor-api-level,34),34)
$(error sdk-to-vendor-api-level is broken for pre-Trunk-Stable SDKs)
endif
ifneq ($(call sdk-to-vendor-api-level,35),202404)
$(error sdk-to-vendor-api-level is broken for post-Trunk-Stable SDKs)
endif
ifneq ($(call sdk-to-vendor-api-level,10000),10000000)
$(error sdk-to-vendor-api-level is broken for current $(call sdk-to-vendor-api-level,10000))
endif
ifdef PRODUCT_SHIPPING_VENDOR_API_LEVEL
# Follow the version that is set manually.
VSR_VENDOR_API_LEVEL := $(PRODUCT_SHIPPING_VENDOR_API_LEVEL)