Replace hiddenapi-{public,private}-list.txt with a CSV file am: fc274bab4d am: a1a433b368

am: 0e4ce6c0e1

Change-Id: Ib8c051aa4c41b83a1530a964c2ed54af3283611a
This commit is contained in:
David Brazdil 2019-01-21 12:08:22 -08:00 committed by android-build-merger
commit 85b0346b7a
4 changed files with 21 additions and 29 deletions

View File

@ -1226,9 +1226,8 @@ ifndef INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE
INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-private-dex.txt INTERNAL_PLATFORM_SYSTEM_PRIVATE_DEX_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/system-private-dex.txt
endif endif
INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-public-list.txt
INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-private-list.txt
INTERNAL_PLATFORM_HIDDENAPI_FLAGS := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-flags.csv INTERNAL_PLATFORM_HIDDENAPI_FLAGS := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-flags.csv
INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-stub-flags.txt
INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-greylist.csv INTERNAL_PLATFORM_HIDDENAPI_GREYLIST_METADATA := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/hiddenapi-greylist.csv
# Missing optional uses-libraries so that the platform doesn't create build rules that depend on # Missing optional uses-libraries so that the platform doesn't create build rules that depend on

View File

@ -2679,8 +2679,8 @@ $(2): $(1) $(HIDDENAPI) $(INTERNAL_PLATFORM_HIDDENAPI_FLAGS)
echo "--output-dex=$(dir $(2))/`basename $$$${INPUT_DEX}`"; \ echo "--output-dex=$(dir $(2))/`basename $$$${INPUT_DEX}`"; \
done | xargs $(HIDDENAPI) encode --api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS) done | xargs $(HIDDENAPI) encode --api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS)
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(1) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(1)
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_DEX_INPUTS := $$(PRIVATE_DEX_INPUTS) $(1) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_DEX_INPUTS := $$(PRIVATE_DEX_INPUTS) $(1)
endef endef
else # UNSAFE_DISABLE_HIDDENAPI_FLAGS else # UNSAFE_DISABLE_HIDDENAPI_FLAGS
define hiddenapi-copy-dex-files define hiddenapi-copy-dex-files
@ -2696,12 +2696,12 @@ endif # UNSAFE_DISABLE_HIDDENAPI_FLAGS
define hiddenapi-generate-csv define hiddenapi-generate-csv
ifneq (,$(wildcard frameworks/base)) ifneq (,$(wildcard frameworks/base))
# Only generate this target if we're in a tree with frameworks/base present. # Only generate this target if we're in a tree with frameworks/base present.
$(2): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(2): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
$(CLASS2GREYLIST) --public-api-list $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(1) \ $(CLASS2GREYLIST) --stub-api-flags $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS) $(1) \
--write-flags-csv $(2) --write-flags-csv $(2)
$(3): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(3): $(1) $(CLASS2GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
$(CLASS2GREYLIST) --public-api-list $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(1) \ $(CLASS2GREYLIST) --stub-api-flags $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS) $(1) \
--write-metadata-csv $(3) --write-metadata-csv $(3)
$(INTERNAL_PLATFORM_HIDDENAPI_FLAGS): $(2) $(INTERNAL_PLATFORM_HIDDENAPI_FLAGS): $(2)

View File

@ -62,29 +62,22 @@ endif
# Singleton rule which applies $(HIDDENAPI) on all boot class path dex files. # Singleton rule which applies $(HIDDENAPI) on all boot class path dex files.
# Additional inputs are filled with `hiddenapi-copy-dex-files` rules. # Additional inputs are filled with `hiddenapi-copy-dex-files` rules.
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(SOONG_HIDDENAPI_DEX_INPUTS) .KATI_RESTAT: $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS)
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_DEX_INPUTS := $(SOONG_HIDDENAPI_DEX_INPUTS) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(SOONG_HIDDENAPI_DEX_INPUTS)
$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_DEX_INPUTS := $(SOONG_HIDDENAPI_DEX_INPUTS)
.KATI_RESTAT: \ $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS := $(HIDDENAPI_STUBS)
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST) \ $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS_SYSTEM := $(HIDDENAPI_STUBS_SYSTEM)
$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): PRIVATE_HIDDENAPI_STUBS_TEST := $(HIDDENAPI_STUBS_TEST)
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS := $(HIDDENAPI_STUBS) $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS): $(HIDDENAPI) $(HIDDENAPI_STUBS) \
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS_SYSTEM := $(HIDDENAPI_STUBS_SYSTEM) $(HIDDENAPI_STUBS_SYSTEM) $(HIDDENAPI_STUBS_TEST)
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): PRIVATE_HIDDENAPI_STUBS_TEST := $(HIDDENAPI_STUBS_TEST)
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): \
.KATI_IMPLICIT_OUTPUTS := $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)
$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST): $(HIDDENAPI) $(HIDDENAPI_STUBS) \
$(HIDDENAPI_STUBS_SYSTEM) $(HIDDENAPI_STUBS_TEST)
for INPUT_DEX in $(PRIVATE_DEX_INPUTS); do \ for INPUT_DEX in $(PRIVATE_DEX_INPUTS); do \
find `dirname $${INPUT_DEX}` -maxdepth 1 -name "classes*.dex"; \ find `dirname $${INPUT_DEX}` -maxdepth 1 -name "classes*.dex"; \
done | sort | sed 's/^/--boot-dex=/' | xargs $(HIDDENAPI) list \ done | sort | sed 's/^/--boot-dex=/' | xargs $(HIDDENAPI) list \
--stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS)) \ --public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS)) \
--stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_SYSTEM)) \ --public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_SYSTEM)) \
--stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_TEST)) \ --public-stub-classpath=$(call normalize-path-list, $(PRIVATE_HIDDENAPI_STUBS_TEST)) \
--out-public=$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST).tmp \ --out-api-flags=$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS).tmp
--out-private=$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST).tmp $(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS))
$(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST))
$(call commit-change-for-toc,$(INTERNAL_PLATFORM_HIDDENAPI_PRIVATE_LIST))
# Inputs to singleton rules located in frameworks/base # Inputs to singleton rules located in frameworks/base
# Additional inputs are filled with `hiddenapi-generate-csv` # Additional inputs are filled with `hiddenapi-generate-csv`

View File

@ -152,7 +152,7 @@ $(call add_json_list, ManifestPackageNameOverrides, $(PRODUCT_MANIFEST_PACK
$(call add_json_bool, EnforceSystemCertificate, $(ENFORCE_SYSTEM_CERTIFICATE)) $(call add_json_bool, EnforceSystemCertificate, $(ENFORCE_SYSTEM_CERTIFICATE))
$(call add_json_list, EnforceSystemCertificateWhitelist, $(ENFORCE_SYSTEM_CERTIFICATE_WHITELIST)) $(call add_json_list, EnforceSystemCertificateWhitelist, $(ENFORCE_SYSTEM_CERTIFICATE_WHITELIST))
$(call add_json_str, HiddenAPIPublicList, $(INTERNAL_PLATFORM_HIDDENAPI_PUBLIC_LIST)) $(call add_json_str, HiddenAPIStubFlags, $(INTERNAL_PLATFORM_HIDDENAPI_STUB_FLAGS))
$(call add_json_str, HiddenAPIFlags, $(INTERNAL_PLATFORM_HIDDENAPI_FLAGS)) $(call add_json_str, HiddenAPIFlags, $(INTERNAL_PLATFORM_HIDDENAPI_FLAGS))
$(call add_json_list, HiddenAPIExtraAppUsageJars, $(HIDDENAPI_EXTRA_APP_USAGE_JARS)) $(call add_json_list, HiddenAPIExtraAppUsageJars, $(HIDDENAPI_EXTRA_APP_USAGE_JARS))