Allow target to specify LOCAL_PREFER_INTEGRITY
The option will:
- Produce APK with uncompressed dex
- Declare to prefer integrity in manifest
Test: unzip -vl, dex compression looks correct with the option provided
or not.
Test: similarly, aapt dump correct attribute
Bug: None
Change-Id: I16b9a37255150c2ad84af84087dfabb536a3b07a
diff --git a/core/android_manifest.mk b/core/android_manifest.mk
index 8608ca1..c3af942 100644
--- a/core/android_manifest.mk
+++ b/core/android_manifest.mk
@@ -71,6 +71,11 @@
ifeq ($(LOCAL_PRIVATE_PLATFORM_APIS),true)
my_manifest_fixer_flags += --uses-non-sdk-api
endif
+
+ifeq (true,$(LOCAL_PREFER_INTEGRITY))
+ my_manifest_fixer_flags += --prefer-integrity
+endif
+
$(fixed_android_manifest): PRIVATE_MANIFEST_FIXER_FLAGS := $(my_manifest_fixer_flags)
# These two libs are added as optional dependencies (<uses-library> with
# android:required set to false). This is because they haven't existed in pre-P