From bb9d6db326ed132dfcb652e3a7de584a52fbe215 Mon Sep 17 00:00:00 2001 From: Nikita Ioffe Date: Mon, 24 Oct 2022 17:21:58 +0100 Subject: [PATCH] Unconditionally install com.android.virt APEX The change in the packages/modules/Virtualization in the same topic takes care for defining the right variant of the APEX to be installed: * Devices with AVF support will get the full com.android.virt APEX * Devices without AVF support will get an almost empty version that only contains an app that defines AVF-related permissions, and soon the BCP fragment jar. Bug: 243512044 Test: build & flash oriole Test: build & flash redfin Change-Id: I2c38e03529a77dd2820212812433741725115ce0 --- core/android_soong_config_vars.mk | 4 ++++ core/product.mk | 3 +++ target/product/base_system.mk | 1 + 3 files changed, 8 insertions(+) diff --git a/core/android_soong_config_vars.mk b/core/android_soong_config_vars.mk index 9f305cf261..7a2dea6bb6 100644 --- a/core/android_soong_config_vars.mk +++ b/core/android_soong_config_vars.mk @@ -102,6 +102,10 @@ endif # SystemUI. $(call add_soong_config_var,ANDROID,SYSTEMUI_OPTIMIZE_JAVA) +ifdef PRODUCT_AVF_ENABLED +$(call add_soong_config_var_value,ANDROID,avf_enabled,$(PRODUCT_AVF_ENABLED)) +endif + # Enable system_server optimizations by default unless explicitly set or if # there may be dependent runtime jars. # TODO(b/240588226): Remove the off-by-default exceptions after handling diff --git a/core/product.mk b/core/product.mk index 277fa7444b..dcfdf1f739 100644 --- a/core/product.mk +++ b/core/product.mk @@ -367,6 +367,9 @@ _product_single_value_vars += PRODUCT_FSVERITY_GENERATE_METADATA # BRANCH_DEFAULT_MODULE_BUILD_FROM_SOURCE but not an explicitly set value. _product_single_value_vars += PRODUCT_MODULE_BUILD_FROM_SOURCE +# If true, installs a full version of com.android.virt APEX. +_product_single_value_vars += PRODUCT_AVF_ENABLED + .KATI_READONLY := _product_single_value_vars _product_list_vars _product_var_list :=$= $(_product_single_value_vars) $(_product_list_vars) diff --git a/target/product/base_system.mk b/target/product/base_system.mk index 96d7b2fcfd..e01bb8c31d 100644 --- a/target/product/base_system.mk +++ b/target/product/base_system.mk @@ -72,6 +72,7 @@ PRODUCT_PACKAGES += \ com.android.tethering \ com.android.tzdata \ com.android.uwb \ + com.android.virt \ com.android.wifi \ ContactsProvider \ content \