Turn on V3 cow

On all api levels shipping higher than 34 (pixel 8), we want to enable
v3 cow version of the cow format

We need to make this change in product_config.mk since PRODUCT variables
have special interactions with inherit-product. PRODUCT_SHIPPING_API_LEVEL
is defined in device.mk and is unavailable to the parent makefile
(PRODUCT vars are cleared at the beginning of makefiles?).
Having the fallback vabc_cow_version in this file allows us to avoid the
hack below (we would have to modify each device.mk to add a temporary variable)

alternate solution:

We have to create a new variable SHIPPING_API_LEVEL that is a duplicate
of PRODUCT_SHIPPING_API_LEVEL. This is a hack to workaround the
inheritance flow (since vabc_features.mk -> android_t_baseline.mk ->
device.mk).This hack allows this variable to be seen by the parent
.mk file

Bug: 313962438
Test: u->v upgrade path for pixel 8.  v->u dowgrade path for pixel 8
Change-Id: I6e1480e461c20a2fb07c5339828df0e6f6c0f9ec
This commit is contained in:
Daniel Zheng
2024-02-22 13:25:28 -08:00
parent 474afa8f06
commit 7102baaf65
2 changed files with 9 additions and 2 deletions

View File

@@ -606,6 +606,15 @@ ifneq ($$(filter-out true false,$$(PRODUCT_BUILD_$(1)_IMAGE)),)
endif
endef
ifndef PRODUCT_VIRTUAL_AB_COW_VERSION
PRODUCT_VIRTUAL_AB_COW_VERSION := 2
ifdef PRODUCT_SHIPPING_API_LEVEL
ifeq (true,$(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),34))
PRODUCT_VIRTUAL_AB_COW_VERSION := 3
endif
endif
endif
# Copy and check the value of each PRODUCT_BUILD_*_IMAGE variable
$(foreach image, \
PVMFW \