From 081e9b5363768e6945206e3d4863919eef795583 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 16 Apr 2019 15:38:02 -0700 Subject: [PATCH] Always use aapt2 for prebuilt appcompat Running appcompat is missing a dependency on aapt/aapt2. There is no need to switch between aapt and aapt2, so always use aapt2 and add the missing dependency. Fixes: 130575935 Test: treehugger Change-Id: If32c03410fbdb3945bf20f7405de13dc8cd83038 Merged-In: If32c03410fbdb3945bf20f7405de13dc8cd83038 (cherry picked from commit a0d89b994f57fe4f3f0a4416d3834c65125d0174) --- core/app_prebuilt_internal.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/app_prebuilt_internal.mk b/core/app_prebuilt_internal.mk index b429dca0d..dd263dd33 100644 --- a/core/app_prebuilt_internal.mk +++ b/core/app_prebuilt_internal.mk @@ -200,6 +200,9 @@ $(built_module) : | $(DEXPREOPT_STRIP_DEPS) $(built_module) : .KATI_DEPFILE := $(built_module).d endif endif +ifeq ($(module_run_appcompat),true) +$(built_module) : $(AAPT2) +endif $(built_module) : $(my_prebuilt_src_file) | $(ZIPALIGN) $(ZIP2ZIP) $(SIGNAPK_JAR) $(transform-prebuilt-to-target) $(uncompress-prebuilt-embedded-jni-libs) @@ -216,11 +219,7 @@ ifneq ($(LOCAL_CERTIFICATE),PRESIGNED) @# Only strip out files if we can re-sign the package. # Run appcompat before stripping the classes.dex file. ifeq ($(module_run_appcompat),true) -ifeq ($(LOCAL_USE_AAPT2),true) $(call appcompat-header, aapt2) -else - $(appcompat-header) -endif $(run-appcompat) endif # module_run_appcompat ifdef LOCAL_DEX_PREOPT