From 571737e8fcc39f9db301e6928bd184b0bdb7c8ee Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Tue, 12 Dec 2017 15:47:14 +0900 Subject: [PATCH] Set BOARD_VNDK_VERSION=current as a default value For Android P or later launching devices, set BOARD_VNDK_VERSION to "current" as a default value if the value is not defined yet. "PRODUCT_USE_VNDK_OVERRIDE=false" can disable this feature. Bug: 70480159 Bug: 62019611 Test: Unset BOARD_VNDK_VERSION Set PRODUCT_SHIPPING_API_LEVEL "28" - Check if BOARD_VNDK_VERSION is set to "current" Set PRODUCT_USE_VNDK_OVERRIDE to "false" - Check if BOARD_VNDK_VERSION is not defined Change-Id: I8d37579e8c4ca1788705cbc8a42e8812e2b93a22 --- core/config.mk | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/core/config.mk b/core/config.mk index 3b1c1572f..dc2b16a25 100644 --- a/core/config.mk +++ b/core/config.mk @@ -779,6 +779,28 @@ $(foreach req,$(requirements),$(eval $(req)_OVERRIDE ?=)) requirements := +# If PRODUCT_USE_VNDK is true and BOARD_VNDK_VERSION is not defined yet, +# BOARD_VNDK_VERSION will be set to "current" as default. +# PRODUCT_USE_VNDK will be true in Android-P or later launching devices. +PRODUCT_USE_VNDK := false +ifneq ($(PRODUCT_USE_VNDK_OVERRIDE),) + PRODUCT_USE_VNDK := $(PRODUCT_USE_VNDK_OVERRIDE) +else ifeq ($(PRODUCT_SHIPPING_API_LEVEL),) + # No shipping level defined +else ifeq ($(call math_gt_or_eq,27,$(PRODUCT_SHIPPING_API_LEVEL)),) + PRODUCT_USE_VNDK := $(PRODUCT_FULL_TREBLE) +endif + +ifeq ($(PRODUCT_USE_VNDK),true) + ifndef BOARD_VNDK_VERSION + BOARD_VNDK_VERSION := current + endif +endif + +$(KATI_obsolete_var PRODUCT_USE_VNDK_OVERRIDE,Use PRODUCT_USE_VNDK instead) +.KATI_READONLY := \ + PRODUCT_USE_VNDK + ifdef PRODUCT_SHIPPING_API_LEVEL ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),27),) ifneq ($(TARGET_USES_MKE2FS),true)