From c974a2786fa8d47bfa8eb5a2c251900232115c9d Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Thu, 22 Feb 2024 19:29:13 +0000 Subject: [PATCH] Introduce product variable PRODUCT_HIDDEN_API_EXPORTABLE_STUBS The new product variable behaves identical to the build flag RELEASE_HIDDEN_API_EXPORTABLE_STUBS: if the variable is set to true, the hiddenapi flags are generated from the "exportable" stubs (i.e. the stubs that does not include READ_WRITE permission or DISABLE state flagged apis) instead of the "everything" stubs (i.e. the stubs that includes all flagged apis regardless of the state of the flags). If the variable is set to false, the stubs are generated from the "everything" stubs. This product variable will be utilized for `sdk_with_runtime_apis` product in the future changes. Test: m nothing Bug: 326310637 Change-Id: Iab3b46ac39972b8721d3aa07cec622c57dafbd0e --- core/product.mk | 2 ++ core/soong_config.mk | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/product.mk b/core/product.mk index 4250253465..f0071dbc69 100644 --- a/core/product.mk +++ b/core/product.mk @@ -456,6 +456,8 @@ _product_single_value_vars += PRODUCT_BUILD_FROM_SOURCE_STUB _product_list_vars += PRODUCT_BUILD_IGNORE_APEX_CONTRIBUTION_CONTENTS +_product_single_value_vars += PRODUCT_HIDDEN_API_EXPORTABLE_STUBS + .KATI_READONLY := _product_single_value_vars _product_list_vars _product_var_list :=$= $(_product_single_value_vars) $(_product_list_vars) diff --git a/core/soong_config.mk b/core/soong_config.mk index ec0c70eb6f..e77defb423 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -400,6 +400,8 @@ $(call end_json_map) $(call add_json_bool, BuildFromSourceStub, $(findstring true,$(PRODUCT_BUILD_FROM_SOURCE_STUB) $(BUILD_FROM_SOURCE_STUB))) +$(call add_json_bool, HiddenapiExportableStubs, $(filter true,$(PRODUCT_HIDDEN_API_EXPORTABLE_STUBS))) + $(call json_end) $(file >$(SOONG_VARIABLES).tmp,$(json_contents))