From f5b3fc854f5ec128c4c78324a2da7c62b26e45bb Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Mon, 15 Apr 2019 16:11:36 +0100 Subject: [PATCH] Enable core platform API warnings on non-user builds Core platform API violation reporting is disabled by default and can be enabled by setting the persist.debug.dalvik.vm.core_platform_api_policy property. Set it to "just-warn" for non-user builds and leave disabled on user builds. Test: builds, boots Bug: 125701194 Change-Id: I2f4be42373de9fdbc71c3178de6d34e07809f13a --- core/main.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/main.mk b/core/main.mk index 3ff2fcdfc..590bfcc7f 100644 --- a/core/main.mk +++ b/core/main.mk @@ -218,8 +218,7 @@ include build/make/core/pdk_config.mk # # ----------------------------------------------------------------- -# Enable dynamic linker and hidden API developer warnings for -# userdebug, eng and non-REL builds +# Enable dynamic linker warnings for userdebug, eng and non-REL builds ifneq ($(TARGET_BUILD_VARIANT),user) ADDITIONAL_BUILD_PROPERTIES += ro.bionic.ld.warning=1 else @@ -257,6 +256,11 @@ ifneq (,$(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER)) ADDITIONAL_PRODUCT_PROPERTIES += dalvik.vm.systemservercompilerfilter=$(PRODUCT_SYSTEM_SERVER_COMPILER_FILTER) endif +# Enable core platform API violation warnings on userdebug and eng builds. +ifneq ($(TARGET_BUILD_VARIANT),user) +ADDITIONAL_BUILD_PROPERTIES += persist.debug.dalvik.vm.core_platform_api_policy=just-warn +endif + # Sets the default value of ro.postinstall.fstab.prefix to /system. # Device board config should override the value to /product when needed by: #