Revert "Revert "Make privileged apps always keep uncompressed dex files.""
bug: 30972906
bug: 63920015
Test: doing zipinfo on the produced apks after build.
Test: fugu build
This reverts commit f69441b76b3a7e44802e0f574debd1286da4fd85.
Change-Id: I6b029f2044385f3e3fa332091a9244cec79d2474
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 11138db..7d9c7d4 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -606,6 +606,12 @@
@# Keep a copy of apk with classes.dex unstripped
$(hide) cp -f $@ $(dir $@)package.dex.apk
endif # BUILD_PLATFORM_ZIP
+ifneq (true,$(DONT_UNCOMPRESS_PRIV_APPS_DEXS))
+ifeq (true,$(LOCAL_PRIVILEGED_MODULE))
+ @# No need to align, sign-package below will do it.
+ $(uncompress-dexs)
+endif # LOCAL_PRIVILEGED_MODULE
+endif # DONT_UNCOMPRESS_PRIV_APPS_DEXS
ifneq (nostripping,$(LOCAL_DEX_PREOPT))
$(call dexpreopt-remove-classes.dex,$@)
endif