Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1205488d authored by Steven Moreland's avatar Steven Moreland Committed by Gerrit Code Review
Browse files

Merge "vendor API level current is 10,000,000" into main

parents 7c222cc0 fd542660
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -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)