Merge "Do not alter presigned prebuilt apks for SDK > 29." am: 3218d79aa7
Original change: https://android-review.googlesource.com/c/platform/build/+/1705710
Change-Id: Ibb6585eca9474b783762343f0ab9f9302a7becb0
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index bcbce8d..d925899 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -227,9 +227,14 @@
LOCAL_ENFORCE_USES_LIBRARIES := false
endif
-# Verify LOCAL_USES_LIBRARIES/LOCAL_OPTIONAL_USES_LIBRARIES against the manifest.
+# Verify LOCAL_USES_LIBRARIES/LOCAL_OPTIONAL_USES_LIBRARIES
+# If LOCAL_ENFORCE_USES_LIBRARIES is not set, default to true if either of LOCAL_USES_LIBRARIES or
+# LOCAL_OPTIONAL_USES_LIBRARIES are specified.
+# Will change the default to true unconditionally in the future.
ifndef LOCAL_ENFORCE_USES_LIBRARIES
- LOCAL_ENFORCE_USES_LIBRARIES := true
+ ifneq (,$(strip $(LOCAL_USES_LIBRARIES)$(LOCAL_OPTIONAL_USES_LIBRARIES)))
+ LOCAL_ENFORCE_USES_LIBRARIES := true
+ endif
endif
my_enforced_uses_libraries :=