Merge "vendor API level current is 10,000,000" into main am: 1205488d90 am: 07575b27c7

Original change: https://android-review.googlesource.com/c/platform/build/+/3151680

Change-Id: I9337c7bf6cbf38b3d413f84cfc667357c3827cac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Steven Moreland
2024-06-28 22:44:10 +00:00
committed by Automerger Merge Worker

View File

@@ -561,11 +561,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)