From d8c427fbba91137cf6cfa22887d40a306e2cecae Mon Sep 17 00:00:00 2001 From: Luman Qu Date: Fri, 26 Oct 2018 16:53:09 +0000 Subject: [PATCH] Revert "Revert^2: Change command-line flags of hiddenapi" This reverts commit e9540386e2ccef6a01b7ee76f7df080a378d57ac. Reason for revert: Caught by droidcop https://b.corp.google.com/issues/118481351 Change-Id: I66e45ef5a84d63682e5c33c9aa1e708160606611 --- core/definitions.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index b00ab6ff9..baa2342f3 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -2672,10 +2672,9 @@ $(2): $(1) $(HIDDENAPI) $(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \ $(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST) @rm -rf $(dir $(2)) @mkdir -p $(dir $(2)) - for INPUT_DEX in `find $(dir $(1)) -maxdepth 1 -name "classes*.dex" | sort`; do \ - echo "--input-dex=$$$${INPUT_DEX}"; \ - echo "--output-dex=$(dir $(2))/`basename $$$${INPUT_DEX}`"; \ - done | xargs $(HIDDENAPI) encode \ + find $(dir $(1)) -maxdepth 1 -name "classes*.dex" | xargs -I{} cp -f {} $(dir $(2))/; \ + find $(dir $(2)) -maxdepth 1 -name "classes*.dex" | sort | sed 's/^/--dex=/' \ + | xargs $(HIDDENAPI) encode \ --light-greylist=$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST) \ --dark-greylist=$(INTERNAL_PLATFORM_HIDDENAPI_DARK_GREYLIST) \ --blacklist=$(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)